public string UIPath; //UI路径 public UIProperty(UIWindowStyle ws, UIWindowMode wm, UIColliderType wc, UIAnimationType ss, string path) { this.WindowStyle = ws; this.WindowMode = wm; this.ColliderType = wc; this.AnimationType = ss; this.UIPath = path; }
void OnGUI() { EditorGUILayout.BeginVertical(); GUI.enabled = false; m_Root = OLEditorUtilities.transformField("Root", m_Root); m_Manager = (UIManager)EditorGUILayout.ObjectField("Manager", m_Manager, typeof(UIManager), true); GUI.enabled = true; if (m_Root != null) { if (m_Manager == null) { m_Manager = m_Root.GetComponent<UIManager>(); } //Draw the Header EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("GUI Creation Properties", EditorStyles.boldLabel); if (m_Mode == UIWindowMode.M_2D) { m_SelectedType2 = (UIControlType2)EditorGUILayout.EnumPopup("Type", m_SelectedType2); if (GUILayout.Button("3D")) { m_Mode = UIWindowMode.M_3D; } } else { m_SelectedType3 = (UIControlType3)EditorGUILayout.EnumPopup("Type", m_SelectedType3); if (GUILayout.Button("2D")) { m_Mode = UIWindowMode.M_2D; } } EditorGUILayout.EndHorizontal(); switch (m_Mode) { case UIWindowMode.M_2D: gui2D(); break; case UIWindowMode.M_3D: gui3D(); break; } } EditorGUILayout.EndVertical(); }