private static void AddSetPropertyAction() { Type actionType = ActionData.GetActionType("HutongGames.PlayMaker.Actions.SetProperty"); if (actionType == null) { Dialogs.MissingAction("Set Property"); return; } SkillStateAction fsmStateAction = SkillEditor.Builder.InsertAction(SkillEditorMacros.droppedOnState, actionType, SkillEditorMacros.droppedOnAction); FieldInfo field = actionType.GetField("targetProperty", 20); if (field != null) { FieldInfo arg_6B_0 = field; object arg_6B_1 = fsmStateAction; SkillProperty fsmProperty = new SkillProperty(); SkillProperty arg_5E_0 = fsmProperty; SkillObject fsmObject = new SkillObject(); fsmObject.set_Value(SkillEditorMacros.droppedObject); arg_5E_0.TargetObject = fsmObject; fsmProperty.setProperty = true; arg_6B_0.SetValue(arg_6B_1, fsmProperty); } SkillEditor.SetFsmDirty(SkillEditorMacros.droppedOnFsm, true, false, true); SkillEditor.SaveActions(SkillEditorMacros.droppedOnFsm); }
private static void AddSendMessageAction() { SkillStateAction fsmStateAction = ActionUtility.AddAction(SkillEditor.SelectedState, "HutongGames.PlayMaker.Actions.SendMessage", SkillEditorMacros.droppedOnAction); if (fsmStateAction == null) { Dialogs.MissingAction("Send Message"); return; } ActionUtility.SetOwnerDefault(SkillEditorMacros.droppedOnFsm, fsmStateAction, SkillEditorMacros.droppedObject as GameObject, "gameObject"); SkillEditor.SetFsmDirty(SkillEditorMacros.droppedOnFsm, true, false, true); SkillEditor.SaveActions(SkillEditorMacros.droppedOnFsm); }