예제 #1
0
 private void OnDestroy()
 {
     if (AuthorSettings.IsChanged() && !string.IsNullOrWhiteSpace(AuthorSettings.Name))
     {
         if (EditorUtility.DisplayDialog("Default Author Info", $"Save default author info changes?", "Yes", "No"))
         {
             AuthorSettings.SaveAll();
         }
     }
 }
예제 #2
0
        private void DrawReloadButton()
        {
            bool enabled = AuthorSettings.IsChanged();

            EditorGUI.BeginDisabledGroup(!enabled);
            if (GUILayout.Button("Reload"))
            {
                AuthorSettings.Initialize();
                Debug.Log("Default author info have been reloaded.");
            }
            EditorGUI.EndDisabledGroup();
        }
예제 #3
0
        private void DrawSaveButton()
        {
            bool enabled = AuthorSettings.IsChanged() && !string.IsNullOrWhiteSpace(AuthorSettings.Name);

            EditorGUI.BeginDisabledGroup(!enabled);
            if (GUILayout.Button("Save"))
            {
                AuthorSettings.SaveAll();
                AuthorSettings.Initialize();
                Debug.Log("Default author info have been updated.");
            }
            EditorGUI.EndDisabledGroup();
        }