andrei.nicolae Posted June 20, 2018 Share Posted June 20, 2018 Hi guys, does anyone know how can I bring in front of all of my scene a container(popup) that was created in a previous scene? Is this possbile? Thanks. Link to comment Share on other sites More sharing options...
rich Posted June 20, 2018 Share Posted June 20, 2018 If the Container isn't a child of the current Scene, it cannot be positioned in that Scene's display list. Either bring the Scene which owns the Container above the current one, or create the Container in the Scene in which you actually need to position it. Link to comment Share on other sites More sharing options...
andrei.nicolae Posted June 20, 2018 Author Share Posted June 20, 2018 Thank you for the quick answer. So if I need a popup in multiple scenes I have to create it in each one, right? I was hoping I could use something like a prefab, which I could show in any scene at any given time. Link to comment Share on other sites More sharing options...
rich Posted June 20, 2018 Share Posted June 20, 2018 Game Objects belong to a Scene. I would still just have a Scene dedicated to the pop-up, position it above all the others, and wake / sleep it as needed. Link to comment Share on other sites More sharing options...
brentstrandy Posted June 20, 2018 Share Posted June 20, 2018 @andrei.nicolae Put this line of code inside the pop-up scene before showing the container and it will move the pop-up to the top of the display order this.scene.bringToTop(); Link to comment Share on other sites More sharing options...
Recommended Posts