| | |
| | | |
| | | public override void OnInspectorGUI() |
| | | { |
| | | serializedObject.Update(); |
| | | base.OnInspectorGUI(); |
| | | // serializedObject.Update(); |
| | | |
| | | EditorGUILayout.PropertyField(uiLayer); |
| | | EditorGUILayout.PropertyField(uiName); |
| | | EditorGUILayout.PropertyField(isMainUI); |
| | | EditorGUILayout.PropertyField(supportParentChildRelation); |
| | | // EditorGUILayout.PropertyField(uiLayer); |
| | | // EditorGUILayout.PropertyField(uiName); |
| | | // EditorGUILayout.PropertyField(isMainUI); |
| | | // EditorGUILayout.PropertyField(supportParentChildRelation); |
| | | |
| | | EditorGUILayout.Space(); |
| | | EditorGUILayout.LabelField("持久化设置", EditorStyles.boldLabel); |
| | | EditorGUILayout.PropertyField(isPersistent); |
| | | if (isPersistent.boolValue) |
| | | { |
| | | EditorGUI.indentLevel++; |
| | | EditorGUILayout.PropertyField(maxIdleRounds); |
| | | EditorGUI.indentLevel--; |
| | | } |
| | | // EditorGUILayout.Space(); |
| | | // EditorGUILayout.LabelField("持久化设置", EditorStyles.boldLabel); |
| | | // EditorGUILayout.PropertyField(isPersistent); |
| | | // if (isPersistent.boolValue) |
| | | // { |
| | | // EditorGUI.indentLevel++; |
| | | // EditorGUILayout.PropertyField(maxIdleRounds); |
| | | // EditorGUI.indentLevel--; |
| | | // } |
| | | |
| | | EditorGUILayout.Space(); |
| | | EditorGUILayout.LabelField("动画设置", EditorStyles.boldLabel); |
| | | EditorGUILayout.PropertyField(openAnimationType); |
| | | EditorGUILayout.PropertyField(closeAnimationType); |
| | | EditorGUILayout.PropertyField(animeRoot, new GUIContent("animeRoot (动画根节点)")); |
| | | if (openAnimationType.enumValueIndex != 0 || closeAnimationType.enumValueIndex != 0) |
| | | { |
| | | EditorGUI.indentLevel++; |
| | | EditorGUILayout.PropertyField(animeDuration); |
| | | if ((UIAnimationType)openAnimationType.enumValueIndex == UIAnimationType.ScaleOverInOut) |
| | | { |
| | | EditorGUILayout.PropertyField(scaleOverInOutCurve); |
| | | } |
| | | EditorGUILayout.PropertyField(animationEase); |
| | | EditorGUI.indentLevel--; |
| | | } |
| | | // 动画生效提示 |
| | | if ((openAnimationType.enumValueIndex != 0 || closeAnimationType.enumValueIndex != 0) && animeRoot.objectReferenceValue == null) |
| | | { |
| | | EditorGUILayout.HelpBox("如需动画生效,必须指定 animeRoot(动画根节点)!", MessageType.Warning); |
| | | } |
| | | // EditorGUILayout.Space(); |
| | | // EditorGUILayout.LabelField("动画设置", EditorStyles.boldLabel); |
| | | // EditorGUILayout.PropertyField(openAnimationType); |
| | | // EditorGUILayout.PropertyField(closeAnimationType); |
| | | // EditorGUILayout.PropertyField(animeRoot, new GUIContent("animeRoot (动画根节点)")); |
| | | // if (openAnimationType.enumValueIndex != 0 || closeAnimationType.enumValueIndex != 0) |
| | | // { |
| | | // EditorGUI.indentLevel++; |
| | | // EditorGUILayout.PropertyField(animeDuration); |
| | | // if ((UIAnimationType)openAnimationType.enumValueIndex == UIAnimationType.ScaleOverInOut) |
| | | // { |
| | | // EditorGUILayout.PropertyField(scaleOverInOutCurve); |
| | | // } |
| | | // EditorGUILayout.PropertyField(animationEase); |
| | | // EditorGUI.indentLevel--; |
| | | // } |
| | | // // 动画生效提示 |
| | | // if ((openAnimationType.enumValueIndex != 0 || closeAnimationType.enumValueIndex != 0) && animeRoot.objectReferenceValue == null) |
| | | // { |
| | | // EditorGUILayout.HelpBox("如需动画生效,必须指定 animeRoot(动画根节点)!", MessageType.Warning); |
| | | // } |
| | | |
| | | EditorGUILayout.Space(); |
| | | EditorGUILayout.LabelField("遮罩设置", EditorStyles.boldLabel); |
| | | // EditorGUILayout.Space(); |
| | | // EditorGUILayout.LabelField("遮罩设置", EditorStyles.boldLabel); |
| | | |
| | | EditorGUILayout.BeginHorizontal(); |
| | | // EditorGUILayout.BeginHorizontal(); |
| | | |
| | | EditorGUILayout.PropertyField(openMask); |
| | | EditorGUILayout.PropertyField(clickEmptySpaceClose); |
| | | // EditorGUILayout.PropertyField(openMask); |
| | | // EditorGUILayout.PropertyField(clickEmptySpaceClose); |
| | | // EditorGUI.BeginChangeCheck(); |
| | | // openMask.boolValue = GUILayout.Toggle(openMask.boolValue, "开启遮罩", EditorStyles.miniButtonLeft); |
| | | // clickEmptySpaceClose.boolValue = GUILayout.Toggle(clickEmptySpaceClose.boolValue, "点击空白关闭", EditorStyles.miniButtonRight); |
| | |
| | | // clickEmptySpaceClose.boolValue = tempClickEmptyClose; |
| | | // } |
| | | // } |
| | | EditorGUILayout.EndHorizontal(); |
| | | // EditorGUILayout.EndHorizontal(); |
| | | |
| | | serializedObject.ApplyModifiedProperties(); |
| | | // serializedObject.ApplyModifiedProperties(); |
| | | } |
| | | } |