Esempio n. 1
0
 public static ShowModelUIManager GetSingleton()
 {
     if (instance == null)
     {
         GameObject go = new GameObject("ShowModelUIManager");
         instance = go.AddComponent <ShowModelUIManager>();
     }
     return(instance);
 }
Esempio n. 2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button("Play"))
            {
                ShowModelUIManager.GetSingleton().WatchModle(ShowModelUIManager.GetSingleton().mUITexture, ShowModelUIManager.GetSingleton().mGameObject);
            }
        }
Esempio n. 3
0
        //实例化的时候调用;
        private void Awake()
        {
            instance = this;

            //跳场景不删除;
            DontDestroyOnLoad(this);

            //获取临时渲染纹理;
            mRenderTexture = RenderTexture.GetTemporary(Screen.width, Screen.height, 16);

            CreateCamera(mRenderTexture);
        }