Unity日常技巧

来源:互联网 发布:pfm软件 编辑:程序博客网 时间:2024/06/09 16:49

1. 

public class GameManage : MonoBehaviour 
{
    public GameObject miehuotishi;
    public static GameManage _instance { 
        get; set; }


void Start () 
    {
        _instance = this;  //当脚本GameManage 绑定到一个scene中的camera上,场景play时,该GameManage 就被unity实例化了,此时可以使用该方法获取GameManage 实例
        
        view[0] = 0;
        view[1] = 0;
        view[2] = 0;
        view[3] = 0;
}  ........

0 0