Skip to content

Commit

Permalink
Clean up mirror custom editor
Browse files Browse the repository at this point in the history
  • Loading branch information
oneVR committed Jun 5, 2020
1 parent c1cbd11 commit 8ed141b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Scripts/Editor/CustomEditors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public override void OnInspectorGUI()
EditorGUILayout.LabelField("Quick set Reflect Layers:");

EditorGUILayout.BeginHorizontal();

if (GUILayout.Button("Show only players"))
{
foreach (GameObject mirror in Selection.objects)
Expand All @@ -45,6 +46,7 @@ public override void OnInspectorGUI()
mirror.GetComponent<VRC_MirrorReflection>().m_ReflectLayers.value = 262657;
}
}

EditorGUILayout.EndHorizontal();

if (Selection.gameObjects.Length == 1)
Expand All @@ -63,11 +65,14 @@ public override void OnInspectorGUI()
}

showExplanations = EditorGUILayout.Foldout(showExplanations, "VRChat specific layer explanations");

if (showExplanations)
{
GUIStyle style = new GUIStyle(GUI.skin.label);
style.richText = true;
style.wordWrap = true;
GUIStyle style = new GUIStyle(GUI.skin.label)
{
richText = true,
wordWrap = true
};

GUILayout.Label("<b>Player:</b>\nThis layer is used for other players than yourself", style);
GUILayout.Label("<b>PlayerLocal:</b>\nThis layer is only used for first-person view and should not be enabled in mirrors", style);
Expand Down

0 comments on commit 8ed141b

Please sign in to comment.