脚本的基本使用 定义与挂载monobehaviour 1.新建一个场景 2.新建脚本 using System.Collections; using System.Collections.Generic; using UnityEngine; public class MyCoponent : MonoBehaviour { // Use this for initialization // 第一帧调用所需执行的函数 void Start () { } // Update is called o
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. d