예제 #1
0
 private static void BeginPrefabInstanceCheck()
 {
     if (FsmEditorSettings.ConfirmEditingPrefabInstances && InspectorPanel.editingPrefabInstance != null && InspectorPanel.editingPrefabInstance == SkillEditor.SelectedFsm)
     {
         EditorGUILayout.HelpBox(Strings.get_Label_Editing_Prefab_Instance(), 1);
         InspectorPanel.editingDisabledForPrefabInstance = false;
     }
     else
     {
         InspectorPanel.editingDisabledForPrefabInstance = (FsmEditorSettings.ConfirmEditingPrefabInstances && SkillPrefabs.IsPrefabInstance(SkillEditor.SelectedFsm));
         if (InspectorPanel.editingDisabledForPrefabInstance)
         {
             EditorGUILayout.HelpBox(Strings.get_Label_Confirm_Editing_of_Prefab_Instance(), 1);
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             if (GUILayout.Button(Strings.get_Label_Edit_Prefab(), new GUILayoutOption[0]))
             {
                 SkillEditor.SelectPrefabParent();
             }
             if (GUILayout.Button(Strings.get_Label_Edit_Instance(), new GUILayoutOption[0]))
             {
                 InspectorPanel.editingPrefabInstance = SkillEditor.SelectedFsm;
             }
             GUILayout.EndHorizontal();
             SkillEditor.GraphView.DisableEditing(Strings.get_Label_Editing_of_Prefab_Instance_is_disabled());
         }
     }
     EditorGUI.BeginDisabledGroup(InspectorPanel.editingDisabledForPrefabInstance);
 }
예제 #2
0
 public static bool IsPrefabInstance(Skill fsm)
 {
     return(SkillPrefabs.IsPrefabInstance(fsm));
 }