コード例 #1
0
 private void DeleteAction()
 {
     if (EditorUtility.DisplayDialog("Delete Action", "Are you sure you want to remove this action from the agent?", "Delete", "Cancel"))
     {
         if (utilityAIAgentEditor.GetType() == typeof(UtilityAIAgentEditor))
         {
             UtilityAIAgentEditor editorWindow = (UtilityAIAgentEditor)utilityAIAgentEditor;
             editorWindow.RemoveItemFromCollection(editorWindow.utilityAIAgent.actions, action);
         }
     }
 }
コード例 #2
0
 private void DeleteEntry()
 {
     if (EditorUtility.DisplayDialog("Delete Delegate Entry", "Are you sure you want to remove this delegate entry from the action?", "Delete", "Cancel"))
     {
         if (exposedDelegateEditor.utilityAIActionEditor.utilityAIAgentEditor.GetType() == typeof(UtilityAIAgentEditor))
         {
             UtilityAIAgentEditor editorWindow = (UtilityAIAgentEditor)exposedDelegateEditor.utilityAIActionEditor.utilityAIAgentEditor;
             editorWindow.RemoveItemFromCollection(exposedDelegateEditor.utilityAIActionEditor.action.action.delegateEntries, delegateEntry);
         }
     }
 }