public override void OnPreviewGUI(Rect position, GUIStyle style)
{
if (!this.ValidPreviewSetup())
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.FlexibleSpace();
Color color = GUI.color;
GUI.color = new Color(1f, 1f, 1f, 0.5f);
GUILayout.Label("Reflection Probe not baked yet", new GUILayoutOption[0]);
GUI.color = color;
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
}
else
{
ReflectionProbe target = base.target as ReflectionProbe;
if (((target != null) && (target.texture != null)) && (base.targets.Length == 1))
{
Editor cubemapEditor = this.m_CubemapEditor;
Editor.CreateCachedEditor(target.texture, null, ref cubemapEditor);
this.m_CubemapEditor = cubemapEditor as TextureInspector;
}
if (this.m_CubemapEditor != null)
{
this.m_CubemapEditor.SetCubemapIntensity(this.GetProbeIntensity((ReflectionProbe) base.target));
this.m_CubemapEditor.OnPreviewGUI(position, style);
}
}
}