- Home /
Show hidden object when loading a Scene2 using a button from Scene1.
have 2 scenes. Scene 1 has a button, Scene2 has a gameobject that is hidden (I have reason why I hide it). When I press the button from scene1, how can I load scene2 and show the hidden gameobject?*
Answer by Santosh_Nair · Oct 14, 2018 at 05:44 PM
You can load scene2 using Scenemanager.LoadScene("Scene2") . And is there any specific reason you want this gameobject to stay hidden? Because it will, either way, be not visible from scene1. Only after he presses the button will scene2 be loaded and gameobject be visible. If yes, then you can use SceneManager.Sceneloaded to enable the hidden gameobject once scene2 is loaded.
Your answer

Follow this Question
Related Questions
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers
Can't remove GameObject from scene in editor (Not appear in heirarchy, not selectable, Ghost object) 2 Answers
How Can I Copy My Gameobject To Other Scene How Can I Copy Gameobject to different scene 1 Answer
How to find Inactive GameObject 16 Answers
All the objects in my script choose the same target. 2 Answers