- Home /
How to stop a game object from going into it's original active state from editor mode.,Make a game object remain deactivated
I have a game object that is set to active in the editor. I press play and I deactivate that game object in play mode. I stop play and the game object reactivates itself in editor mode. Is there a way to stop the game object from returning to its original active state when stopping play?,I have a game object that is active before play. Which then I want to deactivate during Play. How do I set it to remain inactive after stopping play and into the next Play session?
Answer by HellsHand · Apr 21, 2021 at 03:36 PM
I don't believe so(I could be wrong), I would just leave it deactivated and then activate it in Start()
. Is there a reason for doing it this way?
The reason I wanna do that is because I cannot get my head around saving and loading so instead of that I just want the objects to remain deactivated.
For more context, I am making a maze game with different difficulty levels. Easy Medium Hard.
Medium and Hard are blocked by walls that get deactivated once you finish the precedent difficulty. Completing easy unlock Medium, completing Medium unlocks Hard.
And again, because I cannot figure out a saving system, everytime the game/scene gets reloaded the doors reactivate blocking the player from going to a harder difficulty.
Your answer
Follow this Question
Related Questions
DestroyImmediate(component.gameObject) destroys component but not gameObject 1 Answer
Something in this Script keeps activating UI-Buttons 1 Answer
SetActive() not working on child objects 2 Answers
How to specify the rotation angle in degrees, in the inspector? 2 Answers
Select and deselect in Editor via C# 1 Answer