Beispiel #1
0
        void OnDisable()
        {
            if (global_instance == this)
            {
                global_instance = null;
            }

            Camera.onPreCull -= DrawWithCamera;
        }
Beispiel #2
0
        void OnEnable()
        {
            if (global_instance == null)
            {
                global_instance = this;
            }

            Camera.onPreCull -= DrawWithCamera;
            Camera.onPreCull += DrawWithCamera;
        }