Question by
TheDecentPanda · Jan 14 at 03:18 AM ·
camerahierarchycomponentsplaymodepublic variable
Camera won't stay attached to script when play button is pressed
I have a basic script that has a public Camera variable. I have attached the main camera to the script within the UI script component. However, everytime I click play the camera object switches back to "none" and I have to manually add the camera back after the game has already begun.
Is this a bug or would there be a reason for this to happen?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613051641im_/https://answers.unity.com/themes/thub/images/avi.jpg)