I use the code below to hide the UI image.
GameObject.Find("Image").GetComponent<UnityEngine.UI.Image>().enabled=false;
With this hidden method, when I want to display it in another script, it seems that the UI image has not been obtained, but is there any other way to obtain the UI or hide it in another script?
unity3d
I was also worried about something before, so I was able to solve it by referring to the following.
The corresponding item appears in the middle of the page.
Show or hide Button
http://qiita.com/2dgames_jp/items/b3d7d204895d67742d0c
gameObject.SetActive(false); is
GameObject.Find("Image").GetComponent().enabled=false;
I think it's okay to do.
© 2024 OneMinuteCode. All rights reserved.