public override void OnDisable() { if (this.m_Arrows != null) { this.m_Arrows.Release(); } this.m_Arrows = null; }
void OnDisable() { DestroyImmediate(_material); _material = null; _arrows.DestroyMesh(); _arrows = null; }
public override void OnDisable() { if (m_Arrows != null) { m_Arrows.Release(); } m_Arrows = null; }
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(); }
void OnDisable() { DestroyImmediate(_commonMaterial); _commonMaterial = null; DestroyImmediate(_motionMaterial); _motionMaterial = null; _arrows.DestroyMesh(); _arrows = null; }
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); } }