Ejemplo n.º 1
0
        public static void ShowWindow()
        {
            GraphVariableEditorWindow graphEditorWindow = GetWindow <GraphVariableEditorWindow>();

            graphEditorWindow.minSize      = new Vector2(300, 400);
            graphEditorWindow.titleContent = new GUIContent("变量编辑器");
        }
Ejemplo n.º 2
0
        private void OnGUI()
        {
            instance = this;


            //初始化
            if (supportTypeNames == null)
            {
                supportTypeNames = new string[supportTypeList.Count];

                for (int i = 0; i < supportTypeList.Count; i++)
                {
                    supportTypeNames[i] = Utility.BeautifyTypeName(supportTypeList[i]);
                }
            }

            //draw title
            GUILayout.Label("行为图属性", Utility.GetGuiStyle("Title"));
            GUILayout.Space(10);

            GraphEditorWindow graphEditorWindow = GraphEditorWindow.instance;

            if (graphEditorWindow == null || graphEditorWindow.data == null)
            {
                GUILayout.Label("请先打开行为图编辑器窗口", Utility.GetGuiStyle("SkillGraphName"));
                return;
            }

            data = graphEditorWindow.data;

            DrawToolButtons();

            GUILayout.Space(30);

            DrawLocalVariableItemList();
        }
Ejemplo n.º 3
0
 private void OnDestroy()
 {
     instance = null;
 }