- Home /
How come my scriptable object only receives new information when it's selected in the inspector?
I'm making an RPG. When a battle starts I use a scriptable object to hold the players current position so when the battle ends it's set the place the player in the position previously declared in the scriptable object.
However, it only works when it's selected in the inspector if it's not selected it won't work. I've tested this many times and I've confirmed it's no coincidence. Is there anyway I can get this to work without having it selected in the inspector.
You need to actually post your code. It's likely that you are using Editor code like OnGUI.
Your answer
![](https://koobas.hobune.stream/wayback/20220612220508im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Confused about custom GameObjects,Custom GameObject confusion 0 Answers
NullReferenceException: but I have checked that there is a object and have a if(obj != null) before 0 Answers
Duplicating Component with Some Scene References in Serialized Scriptable Object Class Reference 0 Answers
How to Instantiate objects that are Scriptable Objects 0 Answers
How to Destroy the DontDestroyOnLoad() 2 Answers