| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEditor; |
| | | |
| | | [CustomEditor(typeof(NewBieGuideScriptableObject))] |
| | | public class NewBieGuideScriptableObjectEditor : Editor |
| | | { |
| | | |
| | | public override void OnInspectorGUI() |
| | | { |
| | | var guide = target as NewBieGuideScriptableObject; |
| | | |
| | | guide.stepId = EditorGUILayout.IntField("步骤ID", guide.stepId); |
| | | guide.clickPosition = EditorGUILayout.Vector2Field("点击中心", guide.clickPosition); |
| | | guide.clickSize = EditorGUILayout.Vector2Field("点击大小", guide.clickSize); |
| | | guide.tipPosition = EditorGUILayout.Vector2Field("提示语位置", guide.tipPosition); |
| | | guide.tipContent = EditorGUILayout.TextField("提示语内容", guide.tipContent); |
| | | guide.arrowPosition = (NewBieGuideScriptableObject.ArrowPosition)EditorGUILayout.EnumPopup("引导箭头位置", guide.arrowPosition); |
| | | guide.UIElementPath = EditorGUILayout.TextField("点击目标路径", guide.UIElementPath); |
| | | |
| | | guide.selectBox = (NewBieGuideScriptableObject.SelectBoxPattern)EditorGUILayout.EnumPopup("选中框", guide.selectBox); |
| | | guide.effect2 = EditorGUILayout.IntField("特效2", guide.effect2); |
| | | guide.voice = EditorGUILayout.IntField("音效", guide.voice); |
| | | guide.usherPosition = EditorGUILayout.Vector2Field("引导小姐位置", guide.usherPosition); |
| | | guide.usherOrientation = (NewBieGuideScriptableObject.UsherOrientation)EditorGUILayout.EnumPopup("引导小姐朝向", guide.usherOrientation); |
| | | guide.usherAction = EditorGUILayout.IntField("引导小姐动作", guide.usherAction); |
| | | |
| | | guide.clickAnyWhereComplete = EditorGUILayout.Toggle("点击任意位置完成引导", guide.clickAnyWhereComplete); |
| | | guide.pointerDownComplete = EditorGUILayout.Toggle("鼠标按下即完成引导", guide.pointerDownComplete); |
| | | |
| | | if (GUI.changed) |
| | | { |
| | | EditorUtility.SetDirty(target); |
| | | serializedObject.ApplyModifiedProperties(); |
| | | } |
| | | } |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEditor;
|
| | |
|
| | | [CustomEditor(typeof(NewBieGuideScriptableObject))]
|
| | | public class NewBieGuideScriptableObjectEditor : Editor
|
| | | {
|
| | |
|
| | | public override void OnInspectorGUI()
|
| | | {
|
| | | var guide = target as NewBieGuideScriptableObject;
|
| | |
|
| | | guide.stepId = EditorGUILayout.IntField("步骤ID", guide.stepId);
|
| | | guide.clickPosition = EditorGUILayout.Vector2Field("点击中心", guide.clickPosition);
|
| | | guide.clickSize = EditorGUILayout.Vector2Field("点击大小", guide.clickSize);
|
| | | guide.tipPosition = EditorGUILayout.Vector2Field("提示语位置", guide.tipPosition);
|
| | | guide.tipContent = EditorGUILayout.TextField("提示语内容", guide.tipContent);
|
| | | guide.arrowPosition = (NewBieGuideScriptableObject.ArrowPosition)EditorGUILayout.EnumPopup("引导箭头位置", guide.arrowPosition);
|
| | | guide.UIElementPath = EditorGUILayout.TextField("点击目标路径", guide.UIElementPath);
|
| | |
|
| | | guide.selectBox = (NewBieGuideScriptableObject.SelectBoxPattern)EditorGUILayout.EnumPopup("选中框", guide.selectBox);
|
| | | guide.effect2 = EditorGUILayout.IntField("特效2", guide.effect2);
|
| | | guide.voice = EditorGUILayout.IntField("音效", guide.voice);
|
| | | guide.usherPosition = EditorGUILayout.Vector2Field("引导小姐位置", guide.usherPosition);
|
| | | guide.usherOrientation = (NewBieGuideScriptableObject.UsherOrientation)EditorGUILayout.EnumPopup("引导小姐朝向", guide.usherOrientation);
|
| | | guide.usherAction = EditorGUILayout.IntField("引导小姐动作", guide.usherAction);
|
| | |
|
| | | guide.clickAnyWhereComplete = EditorGUILayout.Toggle("点击任意位置完成引导", guide.clickAnyWhereComplete);
|
| | | guide.pointerDownComplete = EditorGUILayout.Toggle("鼠标按下即完成引导", guide.pointerDownComplete);
|
| | | guide.clickOthersComplete = EditorGUILayout.Toggle("点击其他位置中断引导(会隐藏蒙版)", guide.clickOthersComplete);
|
| | | guide.useWindow = (NewBieGuideScriptableObject.UseWindow)EditorGUILayout.EnumPopup("引导用途需做额外逻辑", guide.useWindow);
|
| | |
|
| | |
|
| | | if (GUI.changed)
|
| | | {
|
| | | EditorUtility.SetDirty(target);
|
| | | serializedObject.ApplyModifiedProperties();
|
| | | }
|
| | | }
|
| | | } |