Example #1
0
 protected virtual void OnDisable()
 {
     if (m_renderer != null)
     {
         m_renderer.Dispose();
         m_renderer = null;
     }
 }
Example #2
0
        protected virtual void OnEnable()
        {
            m_renderer = new PreviewFaceRenderer();
            var assetPath = AssetDatabase.GetAssetPath(target);

            //Debug.LogFormat("assetPath: {0}", assetPath);
            if (!string.IsNullOrEmpty(assetPath))
            {
                Prefab = AssetDatabase.LoadAssetAtPath <GameObject>(assetPath);
            }
        }
Example #3
0
 protected virtual void OnEnable()
 {
     m_renderer = new PreviewFaceRenderer();
     Prefab     = GetPrefab();
 }