Camera Component Not Following Parent GameObject After Load
Posted: Wed May 24, 2023 11:51 am
Hello,
I am currently facing an issue with the Easy Save 3 system in Unity. I have a camera component attached to a GameObject, and during runtime, the camera follows the movement of the GameObject as expected. However, when I save and then load the GameObject using Easy Save 3, the camera component no longer moves with the GameObject.
Here are the details of my setup:
The camera is a child of the GameObject and is correctly parented both before and after loading. I have confirmed this by checking camera.transform.parent.name.
The camera's settings appear to be saved and loaded correctly. The field of view, clipping planes, depth, rendering path, etc., are all the same before and after loading.
There are no Rigidbody components involved in the camera or its parent GameObject.
I am not using any events, callbacks, or coroutines to control the camera's behavior.
Despite these, the camera does not follow the GameObject's movement after loading. It seems to lose its dynamic relationship with the parent GameObject.
I would appreciate any insights or suggestions on how to resolve this issue. Is there a specific setting or process I need to follow when saving and loading GameObjects with child camera components?
In a forum post titled "Bug with camera when loading after auto-save" there seems to be a similar problem, and you mention the pixelRect variable. However, I do not make changes to this, and I have unchecked this variable so it is not saved. Despite this, my problem still persists.
Thank you in advance for your assistance.
I am currently facing an issue with the Easy Save 3 system in Unity. I have a camera component attached to a GameObject, and during runtime, the camera follows the movement of the GameObject as expected. However, when I save and then load the GameObject using Easy Save 3, the camera component no longer moves with the GameObject.
Here are the details of my setup:
The camera is a child of the GameObject and is correctly parented both before and after loading. I have confirmed this by checking camera.transform.parent.name.
The camera's settings appear to be saved and loaded correctly. The field of view, clipping planes, depth, rendering path, etc., are all the same before and after loading.
There are no Rigidbody components involved in the camera or its parent GameObject.
I am not using any events, callbacks, or coroutines to control the camera's behavior.
Despite these, the camera does not follow the GameObject's movement after loading. It seems to lose its dynamic relationship with the parent GameObject.
I would appreciate any insights or suggestions on how to resolve this issue. Is there a specific setting or process I need to follow when saving and loading GameObjects with child camera components?
In a forum post titled "Bug with camera when loading after auto-save" there seems to be a similar problem, and you mention the pixelRect variable. However, I do not make changes to this, and I have unchecked this variable so it is not saved. Despite this, my problem still persists.
Thank you in advance for your assistance.