Deserialization Callback
Posted: Fri Nov 26, 2021 11:44 am
Hi there!
Using Unity 2020.3.17 and EasySave 3.3.2f7.
We would like to avoid storing direct ScriptableObject references in our save file so we store their keys (string) and after deserialization we want to access our internal database to get the actual ScriptableObject reference.
For this, objects that are deserialized need to know when they are done being deserialized and the keys are present, much like the ISerializationCallbackReceiver would do for us in the Unity Editor. After deserialization they would then access the Database to get their needed ScriptableObject references.
Does EasySave provide an 'easy' way to do this or should we try to create a custom interface and modify the Load functions of ES3.cs to invoke our own OnAfterDeserialize method if said interface is implemented?
Cheers!
Using Unity 2020.3.17 and EasySave 3.3.2f7.
We would like to avoid storing direct ScriptableObject references in our save file so we store their keys (string) and after deserialization we want to access our internal database to get the actual ScriptableObject reference.
For this, objects that are deserialized need to know when they are done being deserialized and the keys are present, much like the ISerializationCallbackReceiver would do for us in the Unity Editor. After deserialization they would then access the Database to get their needed ScriptableObject references.
Does EasySave provide an 'easy' way to do this or should we try to create a custom interface and modify the Load functions of ES3.cs to invoke our own OnAfterDeserialize method if said interface is implemented?
Cheers!