I’m making an RPG. When a player starts a battle I use a scriptable object to save their position on the over world. I hold the value and when the scene transfers back to the over world it moves the player to the position stored in the object. However it won’t hold the position unless I have it selected in the inspector.
I’ve confirmed it works so is there anyway for me to get it to successfully hold it’s position without selecting it in the inspector?
Don’t use ScriptableObjects like that to save state. You are overwriting an editor asset in the assets folder, not creating persistent save data. This technique will not work in a build. I would suggest you save your world position in a Serializable class using JsonUtility to a file in Application.persistentDataPath.