public override void OnInspectorGUI() { UIView uiview = target as UIView; EditorTools.DrawEntityMark(); EditorTools.DrawUpdateKeyTextField(uiview); UIView.ShowType viewType = (UIView.ShowType)EditorGUILayout.EnumPopup("视图类型", uiview.viewType); float releaseDelay = 0; int orderIndex = 2; if (uiview.viewType != UIView.ShowType.CONTENT) { orderIndex = ViewOrderToIndex(uiview.viewOrder); orderIndex = EditorGUILayout.Popup("渲染层级", orderIndex, hierarchyOptions); releaseDelay = EditorGUILayout.FloatField("延迟释放", uiview.releaseDelay); } if (Application.isPlaying && uiview.viewType != UIView.ShowType.CONTENT) { GUI.color = Color.yellow; EditorGUILayout.LabelField("渲染序号", (uiview.sortingOrder).ToString()); GUI.color = Color.white; } if (GUI.changed) { EditorTools.RegisterUndo("UIView", uiview); uiview.viewType = viewType; uiview.viewOrder = IndexToViewOrder(orderIndex); uiview.releaseDelay = releaseDelay; EditorTools.SetDirty(uiview); } if (EditorTools.DrawHeader("逻辑绑定", false, false)) { this.serializedObject.Update(); //开始检查是否有修改 EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(this.m_EventOnShow, new GUILayoutOption[0]); EditorGUILayout.PropertyField(this.m_EventOnClose, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { this.serializedObject.ApplyModifiedProperties(); } GUILayout.Space(10); } UIUpdateGroupEditor.DrawUpdateTree(uiview); }
public override void OnInspectorGUI() { UIGrid grid = target as UIGrid; EditorTools.DrawUpdateKeyTextField(grid); DrawFields(); GUILayout.Space(10); UIUpdateGroupEditor.DrawUpdateTree(grid); }