コード例 #1
0
    private void ManagerEventGUI()
    {
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);
        {
            DrawEventList();
        }
        EditorGUILayout.EndHorizontal();
        //
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);
        {
            EditorGUILayout.LabelField("请尽量使用 <Eve> 作为事件后缀");
            _content.eventName = EditorGUILayout.TextField("Event Name:", _content.eventName);
            if (GUILayout.Button("Add Event", GUILayout.Height(30)))
            {
                EventUtility.SaveContent(_content);
                if (CanCreate(_content))
                {
                    CreateEventFile(_content);
                }
                else
                {
                    EditorUtility.DisplayDialog("提示", "Event 已存在", "ok");
                }

                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
        }
        EditorGUILayout.EndHorizontal();
    }
コード例 #2
0
 private void OnDisable()
 {
     EventUtility.SaveContent(_content);
     EventUtility.SaveSetting(_setting);
 }