How to pass variables to a scriptable object at runtime?

I’m trying to assign a variable to a scriptable object at runtime but can’t access the fields. Help needed.

Hi Hasnain,

Welcome to our community! :slight_smile:

Variables cannot be assigned or added to objects during runtime. Did you mean that you would like to assign a value to an already existing variable? If so, where would you like to do that? Depending on the situation, your variable probably needs the public access modifier.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms