Page 1 of 1

Scriptable Object Reference without Reference Manager?

Posted: Tue Mar 26, 2024 6:39 pm
by rubine2323
I'm currently encountering a problem related to the reference manager.

I have a class that is saved, but the actual value of the reference isn't important because I use a custom reference script to link to the ScriptableObject. This approach was adopted due to past issues where references changed, rendering save files obsolete because they pointed to different references. Now, the problem arises when I remove the reference manager from the scene, as it's no longer needed. This causes an error because I'm saving a class that holds a reference to a ScriptableObject. Is there a way to configure it to ignore the missing reference and set the value of the specific object to null or something similar?

Re: Scriptable Object Reference without Reference Manager?

Posted: Wed Mar 27, 2024 8:44 am
by Joel
Hi there,

If you want to ignore a field in a class you can use the [ES3NonSerialized] attribute (you would also need to delete the save data to ensure the field isn't stored in there).

See the Choosing what is saved guide for more info:
https://docs.moodkie.com/easy-save-3/es ... -is-saved/

All the best,
Joel