Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Dealing with lots of "screens" and cameras

Discussion in 'Unity UI & TextMesh Pro' started by dogfacedesign, Nov 10, 2018.

  1. dogfacedesign

    dogfacedesign

    Joined:
    Jan 10, 2016
    Posts:
    70
    So in my game, I have a number of different screens (more than 12) that are shown to the player. It is more of a simulation than a game, per se. At any rate, at one point I had them all on one camera, which made editing the screens a pain in the butt because I would always have to use the inspector to disable the screens I wasn't working on, make the change to the one that needed it, re-enable them all, then test.

    So, I decided to create separate cameras, one for each screen, and spread the UI for those screens across those cameras. It makes editing a heck of a lot easier (even though NGUI didn't play too well all the time).

    I am curious if my approach sounds "reasonable", or perhaps there are other ways I could deal with it. I am ok with the way it is now, I suppose, but I'm always willing to learn new approaches to solving problems!

    Cheers.
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,371
    There are performance issues with having lots of cameras (though probably avoidable if you disable/enable them selectively) - but I have always just used either multiple canvas objects, or multiple panels under the canvas to hold each potential "screen" for the game. Honestly though - if you aren't experiencing lag or glitches, there is no reason not to just do what works best for your workflow.
     
  3. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    2,601
    I wouldn't do that if you don't have any use of the multiple cameras run time. If it's purely editing tool, I would rather write a small script which show a bunch of buttons and on click enable/disable the proper "screen" for you automatically. Or a dropdown or something like that.