Unity Panel open & close

Making a Popup and Closable Panel in Unity 5

script:

public GameObject thePanel;

public open()

{

     thePannel.SetActive(true);

}

 

 

public open()

{

     thePannel.SetActive(false);

}

and add the up script to an Empty Object

 

add open/close button on the scene.

define open/close button onClick() function to call script's open/close function.

 

posted @ 2016-04-17 16:34  wiessharling  阅读(644)  评论(0编辑  收藏  举报