Пример #1
0
 static void Init()
 {
     if (m_window == null)
     {
         m_window = ( UVSheetViewer )EditorWindow.GetWindow(typeof(UVSheetViewer), false, "UVSheet Viewer");
     }
     m_window.minSize  = new Vector2(400, 300);
     m_window.position = new Rect(0, 0, m_window.minSize.x, m_window.minSize.y);
     m_window.Show();
 }
Пример #2
0
 void OnDestroy()
 {
     m_window = null;
     if (_grayTexture != null)
     {
         UnityEngine.Object.DestroyImmediate(_grayTexture);
         _grayTexture = null;
     }
     if (_drawMatT != null)
     {
         UnityEngine.Object.DestroyImmediate(_drawMatT);
         _drawMatT = null;
     }
     if (_drawMatC != null)
     {
         UnityEngine.Object.DestroyImmediate(_drawMatC);
         _drawMatC = null;
     }
 }