“In a deployed build, however, you can’t use ScriptableObjects to save data, but you can use the saved data from the ScriptableObject Assets that you set up during development.” - Manual
I am doing this to try a different method of writing out player choices.
so for my game
it will have different locations
Each location can have different states
I am doing this so I don’t have to type out
press 1 to go to main street every time?
instead I can just do
press 1 to go to
my question:
So I cannot initialize and assign data to variables inside the scripts of scriptable objects?
Is this the issue or am I doing something else wrong?
Do you guys have any suggestions on how I can let the computer write out the next location the player will go for me?
Unless I misunderstood your description, you do not use the ScriptableObject to save data, do you? If you do not modify the scriptable object during runtime, the quote from the manual should be irrelevant for your problem.
Did you test your game in the Unity editor? Does the text get displayed? I assume you want to see “press 1 to go to dd”.
Also did you create an actual scriptable object or are you trying to use the script? The latter won’t work.
Hello!
Thank you for your reply and clarification about the runtime!! Yeah, I put “dd” inside locationName. I assume that is not really considered saving data.
yes, I want to say “press 1 to go to dd”.
also I figured out the issue!
I think I had to restart unity after making changes to a variable inside my scriptable object?
Otherwise, it won’t update…
locationName was empty before.
then I added dd to it
it’s just that after adding “dd” nothing really changed?
but after restarting unity it seemed to work.
Yes, that might have been the case. It’s not uncommon that Unity does not update certain things when working with different objects in the Assets folder. Restarting usually helps.