Jump to content
  • Advertisement

Recommended Posts

Hi there! Is the first time that I'm posting here so I'm sorry if I'm doing it wrong ha. 

So here it comes, my doubt is, I'm doing a game with different levels, each of these levels in one different scene. Each scene contains to cameras that you can change pressing a button. Everything works fine. 

The only problem is that I would like it to look a bit more professional, and I would like that if you finish the level with camera2, the next level start the same way. I've been thinking about using dontdestroyonloadon both cameras, but obviously this cameras need to be attached to the player to make the movement work, what do you recommend? Sorry If I've explained it in a messy way, and feel free to dm me for anything. Thanks in advance! 

Share this post


Link to post
Share on other sites
Advertisement

I'm guessing you mean you have different camera configurations and then you switch among them with a button, like in a car game, you have a outside camera and a cockpit one.

If so, I'd suggest you store that in some sort of "settings", and then retrieve the "initial" camera from those settings, every time you load that level. In Unity should be just a matter of serializing those settings. The "camera setting" could be anything you need, from the camera name (so you can find it later on), to an struct containing for instance, the zoom+angle+whatever...

If it's something more complex, maybe it'd be a good idea to create a Camera System that manages all that, and then having that be the one you "DontDestroyOnLoad" if needed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!