protected override void OnEnable() { if (preview == null) { preview = CreateInstance <Texture3DPreview>(); } base.OnEnable(); preview.OnEnable(); }
protected virtual void OnEnable() { m_WrapU = serializedObject.FindProperty("m_TextureSettings.m_WrapU"); m_WrapV = serializedObject.FindProperty("m_TextureSettings.m_WrapV"); m_WrapW = serializedObject.FindProperty("m_TextureSettings.m_WrapW"); m_FilterMode = serializedObject.FindProperty("m_TextureSettings.m_FilterMode"); m_Aniso = serializedObject.FindProperty("m_TextureSettings.m_Aniso"); RecordTextureMipLevels(); SetMipLevelDefaultForVT(); m_Texture3DPreview = CreateInstance <Texture3DPreview>(); m_Texture3DPreview.Texture = target as Texture; m_Texture3DPreview.OnEnable(); }