Firstly,
great program; has been very useful to me.
But, I've tried Saving/Loading SOs that contain a SO field, and that field data doesn't Save/Load. Is it possible to do?
Eg:
public void MySO : ScriptableObject
{
public OtherSO otherSO;
}
MySO instance saves, but otherSO data is null on Load.
Save ScriptableObject fields?
Re: Save ScriptableObject fields?
Hi there,
Fields of UnityEngine.Object types (such as ScriptableObjects) are saved by reference, so this indicates that a reference to that ScriptableObject no longer exists (perhaps because it's created at runtime). Are you getting a warning in console saying that a reference is missing?
In this case you should also have a separate save call to save any ScriptableObjects which might need to be loaded by reference. For example every time you create an instance of a ScriptableObject you could add it to a List and save this. And then before loading anything which may reference these ScriptableObjects, load this List.
All the best,
Joel
Fields of UnityEngine.Object types (such as ScriptableObjects) are saved by reference, so this indicates that a reference to that ScriptableObject no longer exists (perhaps because it's created at runtime). Are you getting a warning in console saying that a reference is missing?
In this case you should also have a separate save call to save any ScriptableObjects which might need to be loaded by reference. For example every time you create an instance of a ScriptableObject you could add it to a List and save this. And then before loading anything which may reference these ScriptableObjects, load this List.
All the best,
Joel
Re: Save ScriptableObject fields?
Ok, no problem.
Thanks
Thanks