Need the same main camera for multiple scenes

Hello. Here is my issue. I have a camera that has my state machine script on it. I require to keep this same camera, lest my state machine be destroyed when in different scenes. This state machine holds important information for GUI transitions and such. I would like to know if it is possible to keep this camera for multiple scenes. Also I would like to have the player not be destroyed also for it also contains variable information that can be changed.

2 Answers

2

Is it important that it be attached to a camera?

For your specific solution, you might want to look at DontDestroyOnLoad()

That is what I was failing to grasp. Now I have an empty object called game manager! thanks!

Do not post a comment as a question!

If you have something to reply to, as this is a reply to the answer above it, please post it as a comment and NOT an answer. Also if it solved your question, please accept the answer using the tick under the thumbs down button. Also then delete this answer, since it isn't an answer, but a comment