- Home /
returning to scene & keeping the Camera
Helloo All I am jumping around to all different scenes. I don't have a character controller only a Camera that I am navigating with
So when I go back to a scene I want the Camera in the same place I left it...
I have tried the DontDestroyOnLoad on my Camera - but it doesn't work ( or I'm doing something wrong)
void Awake() {
DontDestroyOnLoad(transform.gameObject);
}
Thanks
~be
What you looking for is persistence, this should help -> http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/persistence-data-saving-loading
Thanks $$anonymous$$pjComp I will look 2 that tutorial when I get back to the computer!
how about saving the position of that camera by making it public. or save it in playerPref
Answer by Occma · Oct 21, 2014 at 09:44 AM
You Can use a globes.cs with a static member for the Transform of the Camera.
At the end of the Scene you write the trans to the member and at the beginning of the new Scene you write from the member to the camera.
Your answer
Follow this Question
Related Questions
Scene loads weird 0 Answers
How do I link a TMpro to a variable in another scene? 0 Answers
DontDestroyOnLoad() Unity 3D 0 Answers
Return to a specific scene & position 0 Answers
Multiple EvenetSystems in Scene - only have 1 after searching though 1 Answer