private static void AddCreateObjectAction() { SkillStateAction fsmStateAction = ActionUtility.AddAction(SkillEditor.SelectedState, "HutongGames.PlayMaker.Actions.CreateObject", SkillEditorMacros.droppedOnAction); SkillStateAction arg_32_0 = fsmStateAction; string arg_32_1 = "gameObject"; SkillGameObject fsmGameObject = new SkillGameObject(); fsmGameObject.set_Value(SkillEditorMacros.droppedObject as GameObject); ActionUtility.SetActionFieldValue(arg_32_0, arg_32_1, fsmGameObject); SkillEditor.SetFsmDirty(SkillEditorMacros.droppedOnFsm, true, false, true); SkillEditor.SaveActions(SkillEditorMacros.droppedOnFsm); }
public static SkillGameObject FsmGameObjectField(GUIContent label, Skill fsm, SkillGameObject fsmGameObject) { if (label == null) { label = GUIContent.none; } EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); if (fsmGameObject.get_UseVariable()) { fsmGameObject = VariableEditor.DoFsmGameObjectPopup(label, fsm, fsmGameObject); } else { fsmGameObject.set_Value((GameObject)EditorGUILayout.ObjectField(label, fsmGameObject.get_Value(), typeof(GameObject), !SkillEditor.SelectedFsmIsPersistent(), new GUILayoutOption[0])); } fsmGameObject = (SkillGameObject)VariableEditor.VariableToggle(fsmGameObject, label.get_text()); VariableEditor.EndVariableEditor(fsmGameObject); return(fsmGameObject); }