|
|
|
|
|
|
const EditMode.SceneViewEditMode EditInfluenceShape = EditMode.SceneViewEditMode.GridBox; |
|
|
|
const EditMode.SceneViewEditMode EditInfluenceNormalShape = EditMode.SceneViewEditMode.Collider; |
|
|
|
const EditMode.SceneViewEditMode EditCenter = EditMode.SceneViewEditMode.ReflectionProbeOrigin; |
|
|
|
const EditMode.SceneViewEditMode EditMirrorPosition = EditMode.SceneViewEditMode.GridMove; |
|
|
|
const EditMode.SceneViewEditMode EditMirrorRotation = EditMode.SceneViewEditMode.GridSelect; |
|
|
|
|
|
|
|
static void Drawer_SectionCaptureStatic(PlanarReflectionProbeUI s, SerializedPlanarReflectionProbe d, Editor o) |
|
|
|
{ |
|
|
|
|
|
|
EditBaseShape, |
|
|
|
EditInfluenceShape, |
|
|
|
EditInfluenceNormalShape, |
|
|
|
//EditCenter
|
|
|
|
}; |
|
|
|
|
|
|
|
static readonly EditMode.SceneViewEditMode[] k_Toolbar_Static_SceneViewEditModes = |
|
|
|
{ |
|
|
|
}; |
|
|
|
static readonly EditMode.SceneViewEditMode[] k_Toolbar_Mirror_SceneViewEditModes = |
|
|
|
{ |
|
|
|
EditMirrorPosition, |
|
|
|
EditMirrorRotation |
|
|
|
}; |
|
|
|
static GUIContent[] s_Toolbar_Contents = null; |
|
|
|
static GUIContent[] toolbar_Contents |
|
|
|
|
|
|
EditorGUIUtility.IconContent("EditCollider", "|Modify the base shape. (SHIFT+1)"), |
|
|
|
EditorGUIUtility.IconContent("PreMatCube", "|Modify the influence volume. (SHIFT+2)"), |
|
|
|
EditorGUIUtility.IconContent("SceneViewOrtho", "|Modify the influence normal volume. (SHIFT+3)"), |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
static GUIContent[] s_Toolbar_Static_Contents = null; |
|
|
|
static GUIContent[] toolbar_Static_Contents |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return s_Toolbar_Static_Contents ?? (s_Toolbar_Static_Contents = new[] |
|
|
|
{ |
|
|
|
|
|
|
|
static GUIContent[] s_Toolbar_Mirror_Contents = null; |
|
|
|
static GUIContent[] toolbar_Mirror_Contents |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
return s_Toolbar_Mirror_Contents ?? (s_Toolbar_Mirror_Contents = new[] |
|
|
|
{ |
|
|
|
EditorGUIUtility.IconContent("MoveTool", "|Move the mirror plane."), |
|
|
|
EditorGUIUtility.IconContent("RotateTool", "|Rotate the mirror plane.") |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
static void Drawer_Toolbar(PlanarReflectionProbeUI s, SerializedPlanarReflectionProbe d, Editor o) |
|
|
|
{ |
|
|
|
GUILayout.BeginHorizontal(); |
|
|
|
|
|
|
EditMode.DoInspectorToolbar(k_Toolbar_SceneViewEditModes, toolbar_Contents, GetBoundsGetter(o), o); |
|
|
|
|
|
|
|
if (d.isMirrored) |
|
|
|
EditMode.DoInspectorToolbar(k_Toolbar_Mirror_SceneViewEditModes, toolbar_Mirror_Contents, GetBoundsGetter(o), o); |
|
|
|
else |
|
|
|
EditMode.DoInspectorToolbar(k_Toolbar_Static_SceneViewEditModes, toolbar_Static_Contents, GetBoundsGetter(o), o); |
|
|
|
|
|
|
|
GUILayout.FlexibleSpace(); |
|
|
|
GUILayout.EndHorizontal(); |
|
|
|