Runtime added component being loaded with different reference

Discussion and help for Easy Save 3
Post Reply
Posts: 10
Joined: Thu Jan 07, 2021 2:42 pm

Runtime added component being loaded with different reference

Post by Ell223 »


Bit of a convoluted one- I have a runtime instantiated object, which instantiates some more child objects onto itself, including individual components onto the child objects. These objects, and the components on them are tracked within a list on the parent object. I am saving the parent gameObject, including its children, and have added appropriate types to Easy Save. When I load back up this object, the components for the child objects are loaded, but the references have changed, and thus the list of them is full of null. The list of the actual child gameObjects are okay though. Other objects also contain references to these components so it is causing issue.

I'm not sure if I am saving/loading the object incorrectly (if I have to refresh the references on load etc), or if there is an issue in the asset somewhere. I have managed to recreate the issue in a new project which I will send to you via PM to help debug.


Post Reply