- Home /
Changes made in playmode don't show until stopping and playing again.
I know a lot of people here are asking to save playmode changes but my situation is the other way around. Here's how it goes : I have a GameObject called GameUi which contains a sprite that acts as an alphaLayer and a Canva with a button in it. I have a GameManager that instantiates GameUi ( GameUi = Instantiate (GameUi);
) and then when I press the button in the GameUi's canva I call a function on my GameManager that does this :
public void StartGame()
{
Transform alphaLayer = GameUi.transform.FindChild ("alphaTexture");
alphaLayer.gameObject.SetActive (false);
BoardManager.instance.BuildBoard ();
}
The BoardManager.instance.BuildBoard (); works fine but any changes made to the GameUi do not show at all. BUT, when I stop playmode and restart it, then GameUi appears with the changes applied to it. (I tried doing other changer like moving the whole ojbject and all, it does the exact same thing). What I need if, like the rest of my game, that the changes appear immediately and reset when I quit playmode. Any ideas why I have this behavior? It's really driving me nuts:)
Thanks in advance
Your answer

Follow this Question
Related Questions
i keep getting compiler errors 1 Answer
All errors have to be fixed 1 Answer
Very slow First entering in playmode (+30s) 0 Answers
Unity stuck on grayed out play screen 0 Answers
How to implement mandatory cleanup for the Unity PlayMode tests? 1 Answer