summaryrefslogtreecommitdiff
path: root/Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-15 12:50:26 +0800
committerchai <chaifix@163.com>2021-09-15 12:50:26 +0800
commit98f31f197a126850a5878cd6e583ae6dbf64ab3d (patch)
tree207f726fb027c227d2fd58bd1bc340cb3a7eaf67 /Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs
parentad950c25abdf7f5a2f0428863d4035e9eb168fd5 (diff)
*rename
Diffstat (limited to 'Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs')
-rw-r--r--Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs b/Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs
new file mode 100644
index 00000000..0d4a0f4f
--- /dev/null
+++ b/Assets/Tools/ActionTool/Editor/ActionInfoEditor.cs
@@ -0,0 +1,47 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEditor;
+
+namespace ActionTool
+{
+
+ // 编辑collider帧
+ public class ActionInfoEditor : EditorWindow
+ {
+ private static string title;
+ private static string content;
+ private static Vector2 size;
+
+ public static void ShowContent(string tlt, string cnt)
+ {
+ title = tlt;
+ content = cnt;
+ size = GUI.skin.label.CalcSize(new GUIContent(content));
+ var editor = EditorWindow.GetWindow<ActionInfoEditor>(true);
+ editor.titleContent = new GUIContent(title);
+ editor.OnEnable();
+ }
+
+ private void OnEnable()
+ {
+ titleContent = new GUIContent(title);
+ maxSize = new Vector2(50 + size.x, 10 + size.y);
+ minSize = maxSize;
+ }
+
+ private void OnDisable()
+ {
+ }
+
+ private void Update()
+ {
+ }
+
+ private void OnGUI()
+ {
+ Vector2 size= GUI.skin.label.CalcSize(new GUIContent(content));
+ GUI.Label(new Rect(5,5, size.x, size.y), content);
+ }
+ }
+} \ No newline at end of file