Scriptable Object Reference without Reference Manager?

Discussion and help for Easy Save 3
Post Reply
rubine2323
Posts: 6
Joined: Wed Jan 19, 2022 11:52 pm

Scriptable Object Reference without Reference Manager?

Post 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?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Scriptable Object Reference without Reference Manager?

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply