Ejemplo n.º 1
0
 void UpdatePreviewTexture()
 {
     if (m_PreviewRenderData.texture == null || !node.previewExpanded)
     {
         m_PreviewTextureView.visible = false;
         m_PreviewTextureView.image   = Texture2D.blackTexture;
     }
     else
     {
         m_PreviewTextureView.visible = true;
         m_PreviewTextureView.AddToClassList("visible");
         m_PreviewTextureView.RemoveFromClassList("hidden");
         if (m_PreviewTextureView.image != m_PreviewRenderData.texture)
         {
             m_PreviewTextureView.image = m_PreviewRenderData.texture;
         }
         else
         {
             m_PreviewTextureView.Dirty(ChangeType.Repaint);
         }
     }
 }
 void OnPreviewChanged()
 {
     m_PreviewTextureView.image = m_PreviewRenderHandle.texture ?? Texture2D.blackTexture;
     m_PreviewTextureView.Dirty(ChangeType.Repaint);
 }