Deleting an existing scene object then saving and loading
Posted: Thu Aug 20, 2020 3:47 pm
Hi,
We have an object called "SceneObjects"[a prefab with es3 prefab and with es3 auto-save components, also save children enabled] in scene hierarchy. This has 2 child objects[Sphere and Cube] in the scene hierarchy. We run the game and we removed a child object[Sphere] and saving it with only one child object[Cube] and load it back. But this throws a null exception, as we know it's looking for the object which we just deleted when we attempt to save on Application quit. But when we checked manually the file is saving the deleted object, means, removed the deleted object entry. But when it's loading, it's loading both objects[Sphere and Cube] including deleted object[Sphere]. it's not saving with the deleted objects. Any idea to handle this situation. Probably we are missing something basic, sorry.
Thanks!
We have an object called "SceneObjects"[a prefab with es3 prefab and with es3 auto-save components, also save children enabled] in scene hierarchy. This has 2 child objects[Sphere and Cube] in the scene hierarchy. We run the game and we removed a child object[Sphere] and saving it with only one child object[Cube] and load it back. But this throws a null exception, as we know it's looking for the object which we just deleted when we attempt to save on Application quit. But when we checked manually the file is saving the deleted object, means, removed the deleted object entry. But when it's loading, it's loading both objects[Sphere and Cube] including deleted object[Sphere]. it's not saving with the deleted objects. Any idea to handle this situation. Probably we are missing something basic, sorry.
Thanks!