- Home /
SetActive in another scene
Hey guys, I have made it so there are two buttons which show and hide a gameobject. But when I transit to another scene, I want it to show (if it was shown on the previous scene) and hide (if it was hidden on the previous scene). How can I do this. I have searched this question up many times, but they always have a sceneManager, and I dont know how to do that. I have to finish this before Friday 28 July so pls answer. Bye, Tushi
Answer by Acid_kenobi · Jul 22, 2017 at 02:01 AM
You will need to persist some amount of data across scenes. So maybe a GameManager object that is kept between scenes with the DontDestroyOnLoad attribute. When you load the new scene have it check whether the objects should be active or not.
Good luck
I've already got a DontDestroyOnLoad, but i dont know how to use it. (I havent tried it in the proper build though. Ill try.) + I dont have the time and skills to do game$$anonymous$$anager. I'm only new to Unity. Thnx for the Luck BTW and thnx for helping. You too george095
Your answer
Follow this Question
Related Questions
Scene loading delay after upgrade 4.6 to 5. 0 Answers
How Do I Link Different Scenes? 4 Answers
Asset Bundle starts loaded 0 Answers
How can I prevent frame spikes when activating parts of a level? 2 Answers