Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity UI [SOLVED] Overlay a scenes with another scene.

Discussion in 'UGUI & TextMesh Pro' started by BrewNCode, Apr 7, 2017.

  1. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Hello, people from Unity. I'm new to this thing of UI and in college, I have a project of a wine simulator. Well, the thing is I need to create the screens in Unity and there is something that bugs me. How can I put a scene over another scene using buttons? The thing that I want is this:

    I'm using Unity 5.5
    scene1 (is the Main screen with some buttons like the settings buttons)
    scene2 (is the settings window, a window that covers no more than the middle of the background)

    so. scene1 => press settings button => scene2 overlays the main camera without covering the entire background(scene1).

    How can I do this?
     
  2. TheWanderingBen

    TheWanderingBen

    Joined:
    Nov 3, 2015
    Posts:
    98
    I don't know the answer with scenes, specifically (and I'm not sure if that's possible with scenes, though maybe somebody else knows how!).

    Is there a reason you would need the settings window to be its own scene, though? Otherwise this is possible with panels. Take a look at Unity's Panes, Panels, and Windows Tutorial and their TogglePanelButton class.
     
  3. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    I agree with Ben that panels sound much easier. You can load scenes into (with) other scenes with LoadSceneAdditive (I think it's called), but for this scenario that seems... odd :)
     
  4. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    You guys mean like disabling and enabling by buttons?
     
  5. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Ya, or by a keystroke.. position it in the center and set it as lastsibling when it's opened. That should do what you were asking about (minus the second scene part).
     
  6. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Nevermind guys. I just solved. I just used a new window and made an On Click function.

    Change the thread to SOLVED.
     
  7. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Very cool. Glad ya got it solved :)