ScriptableObject reference issue
Posted: Fri Oct 13, 2023 10:47 pm
the format of my project is: Main Menu Scene > TownView scene > Any Level
After levels are complete, they go back to the townview scene, the townview has references to all of my scriptable objects and prefabs, they are carried across to the level in inventory objects if the player chooses to buy them. Upon saving them in the townview scene, i can see the file contains references to the scriptable objects. However if the player fails that level and restarts it, it fails to load the reference to the scriptable object correctly.
I noticed that all the saving and loading works correctly, if i set EasySave manager to dontdestroyonload from the main menu, but ideally i'd like to be able to run any scene straight from the editor and not have the saving and loading break.
I have an easy save manager in every scene, i've tried rightclicking all of these assets and adding references to them, ive tried doing this in multiple scenes too. Any ideas on what i'm doing wrong here?
After levels are complete, they go back to the townview scene, the townview has references to all of my scriptable objects and prefabs, they are carried across to the level in inventory objects if the player chooses to buy them. Upon saving them in the townview scene, i can see the file contains references to the scriptable objects. However if the player fails that level and restarts it, it fails to load the reference to the scriptable object correctly.
I noticed that all the saving and loading works correctly, if i set EasySave manager to dontdestroyonload from the main menu, but ideally i'd like to be able to run any scene straight from the editor and not have the saving and loading break.
I have an easy save manager in every scene, i've tried rightclicking all of these assets and adding references to them, ive tried doing this in multiple scenes too. Any ideas on what i'm doing wrong here?