Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Show a level inside a level...

Discussion in 'World Building' started by JRotter, Oct 12, 2020.

  1. JRotter

    JRotter

    Joined:
    Oct 24, 2013
    Posts:
    11
    Hi There,

    I was not sure where to put this, but I am trying to have a minigame pop up once someone triggers it. (by clicking on something, running onto a collider or whatever)

    I tried to load my second Scene with additive LoadSceneMode, which brings up the scene, but it does not really work.

    First, I can still play in the initial scene, I would like it to be shown, but frozen until the player finishes whatever he does in the minigame. I used SetActiceScene and it sets the active scene correctly but I can still use the other scene.

    Do I need to De-Activate all the controls in the other scene manually ?

    Also can I rely on UnloadSceneAsync to close the new Scene Once I am done fast enough so there will be nothing left on the screen?

    And if I am totally going the wrong way, may someone be so kind to point me?

    Cheers,

    jens
     
  2. polemical

    polemical

    Joined:
    Jun 17, 2019
    Posts:
    454
    An approach worth considering.. which could be done with or without multiple scenes - you could render the initial content to texture and use a quad to display that behind the new content. If doing it without another scene to manage, you'd just call SetActive(false) on a root-ish GameObject of your initial content once you've done that and have the quad behind your active content. Note if your resolution, aspect and/or orientation changes while the new content is active, you'll need to update your texture by rendering the initial one again.. making an approach without multiple scenes more appealing for this unless you're sure it won't change at all (i.e. no orientation change allowed plus it's not resizable etc.).
     
    JoeStrout likes this.
unityunity