forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToggleEditor.cs
More file actions
51 lines (47 loc) · 1.95 KB
/
ToggleEditor.cs
File metadata and controls
51 lines (47 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Decompiled with JetBrains decompiler
// Type: UnityEditor.UI.ToggleEditor
// Assembly: UnityEditor.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 02C415E4-CA90-4A5B-B8EB-A397F164EE08
// Assembly location: C:\Users\Blake\shadow-0\Library\UnityAssemblies\UnityEditor.UI.dll
using UnityEngine.UI;
namespace UnityEditor.UI
{
/// <summary>
/// <para>Custom Editor for the Toggle Component.</para>
/// </summary>
[CanEditMultipleObjects]
[CustomEditor(typeof (Toggle), true)]
public class ToggleEditor : SelectableEditor
{
private SerializedProperty m_OnValueChangedProperty;
private SerializedProperty m_TransitionProperty;
private SerializedProperty m_GraphicProperty;
private SerializedProperty m_GroupProperty;
private SerializedProperty m_IsOnProperty;
protected override void OnEnable()
{
base.OnEnable();
this.m_TransitionProperty = this.serializedObject.FindProperty("toggleTransition");
this.m_GraphicProperty = this.serializedObject.FindProperty("graphic");
this.m_GroupProperty = this.serializedObject.FindProperty("m_Group");
this.m_IsOnProperty = this.serializedObject.FindProperty("m_IsOn");
this.m_OnValueChangedProperty = this.serializedObject.FindProperty("onValueChanged");
}
/// <summary>
/// <para>See Editor.OnInspectorGUI.</para>
/// </summary>
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
this.serializedObject.Update();
EditorGUILayout.PropertyField(this.m_IsOnProperty);
EditorGUILayout.PropertyField(this.m_TransitionProperty);
EditorGUILayout.PropertyField(this.m_GraphicProperty);
EditorGUILayout.PropertyField(this.m_GroupProperty);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(this.m_OnValueChangedProperty);
this.serializedObject.ApplyModifiedProperties();
}
}
}