I have runtime instantiated Prefabs whose components can have references to each other. When objects have been loaded some of this references is null.
As far as I understand the problem is that referenced components doesn't exist in time when current component is deserializing.
However I don't see a solution to the problem. Is it possible to deserialize objects fields after instantiating all GameObjects and their components?
All prefabs has enabled ES3Prefab component. I tried use auto save and tried manually save list of objects.
Loading objects that refer to each other
Re: Loading objects that refer to each other
Hi there,
The simplest solution to this is to load twice. Once to load the objects, and again to load the cross-references.
All the best,
Joel
The simplest solution to this is to load twice. Once to load the objects, and again to load the cross-references.
All the best,
Joel