public override void OnDisable()
 {
     if (this.m_Arrows != null)
     {
         this.m_Arrows.Release();
     }
     this.m_Arrows = null;
 }
Пример #2
0
        void OnDisable()
        {
            DestroyImmediate(_material);
            _material = null;

            _arrows.DestroyMesh();
            _arrows = null;
        }
Пример #3
0
        public override void OnDisable()
        {
            if (m_Arrows != null)
            {
                m_Arrows.Release();
            }

            m_Arrows = null;
        }
Пример #4
0
        void OnEnable()
        {
            // Initialize the pairs of shaders/materials.
            _material           = new Material(Shader.Find("Hidden/Kino/Vision"));
            _material.hideFlags = HideFlags.DontSave;

            // Build the array of arrows.
            _arrows = new ArrowArray();
            PrepareArrows();
        }
Пример #5
0
        void OnDisable()
        {
            DestroyImmediate(_commonMaterial);
            _commonMaterial = null;

            DestroyImmediate(_motionMaterial);
            _motionMaterial = null;

            _arrows.DestroyMesh();
            _arrows = null;
        }
Пример #6
0
        void PrepareArrows()
        {
            int row = model.settings.motionVectors.motionVectorsResolution;
            int col = row * Screen.width / Screen.height;

            if (m_Arrows == null)
            {
                m_Arrows = new ArrowArray();
            }

            if (m_Arrows.columnCount != col || m_Arrows.rowCount != row)
            {
                m_Arrows.Release();
                m_Arrows.BuildMesh(col, row);
            }
        }