playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Amimoller

Pages: [1]
1
Playmaker Help / Event setup for button listener and warnings
« on: August 26, 2014, 03:33:12 AM »
Hi,
We have an action that listens to a NGUI button and triggers the event when it is pressed. It works as expected but the action will show a warning because the event is not present in the state where the action is run. (We just run this action once when the FSM is first initialized)
I can get it to go away if i put the eventtarget above the event but then the "self" option will not show non-global events which is not ideal.
Is there any way to fix or suppress the warning?
I guess another way would be to register and unregister on enter/exit in the action and put the action everywhere you want to listen for the event. That just seems needlessly ineffecient.

Here is the action:

Code: [Select]
    public class ButtonListenerActionV2 : FsmStateAction
    {
        [RequiredField]
        public FsmEvent OnClick;
        public FsmEventTarget Target;

        [RequiredField]
        [CheckForComponent(typeof(UIButton))]
        public FsmGameObject Button;

        public override void Reset()
        {
            OnClick = null;
            Button = null;
            Target = null;
        }

        public override void OnEnter()
        {
            if (Button.Value != null)
            {
                if(Target != null)
                {
                    var button = Button.Value.GetComponent<UIButton>();

                    EventDelegate.Add(button.onClick, () => Fsm.Event(Target, OnClick));
                }
            }
            Finish();
        }
    }

2
I just tried with the lastest RC and its still a problem. Im also pretty sure it has something to do with having been in playmode.

I also still get that propertydrawer exception, I havent had a chance to remove our custom ones and see if it helps. Ill try if i can find some time for it.

3
I noticed that i sometimes get this error:

ArgumentNullException: Argument cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[System.Type,HutongGames.PlayMakerEditor.ObjectPropertyDrawer].TryGetValue (System.Type key, HutongGames.PlayMakerEditor.ObjectPropertyDrawer& value) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:588)
HutongGames.PlayMakerEditor.ObjectPropertyDrawers.GetObjectPropertyDrawer (System.Type objType)
HutongGames.PlayMakerEditor.FsmVariable.DoValueGUI (UnityEngine.GUIContent label, Boolean isAsset)
FsmComponentInspector.OnInspectorGUI () (at Assets/Packages/PlayMaker/Editor/FsmComponentInspector.cs:156)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
UnityEditor.DockArea:OnGUI()

Not sure if that could be related, we do have a couple of custom inspectors in the project.

4
Hi,
We have a serious issue with playmaker in our project.
After some time, playmaker seems to forget any further changes you make, I think its related to having been in play mode.

If I make a change to an action and switch to another FSM and back, that change will be forgotten. The only way to make it work is to restart Unity. It happens with Prefabs and Instances.
I have tried both the latest beta and normal 1.7.6 but it still happens.

Unfortunately i cant reproduce it in a simple test project, (our main project is gigabytes of data) so i was hoping someone else might have the same problem.

Cheers
Jonas

5
Playmaker Help / "Local" events
« on: November 14, 2013, 06:31:13 AM »
Maybe im missing something, but why is it that events that are not global are shown in the event browser?

Its annoying because i have to be careful to reuse events with different FSMs to not clutter this window. Maybe an option to not show "local" events?

Cheers!

6
Playmaker Bug Reporting / Editing Prefab instances[SOLVED]
« on: August 27, 2013, 05:15:05 AM »
Does anyone else experience this bug, is there some workaround?

After i upgraded to 1.7.1 whenever i try to edit the fsm in a prefabinstance weird things happen. If you try to rename a state it will get unselected after first keystroke. All actions are auto collapsed, even if you try to expand them they collapse immediately.
If i enable the new option for editing prefab instances the same thing happens

I tried in a completely new project, same result, also tried to restore default settings.

Cheers
Jonas

7
Playmaker Help / Debugging templates
« on: July 03, 2013, 03:09:06 AM »
Hi,
I have several FSM components that are using a template. If you break inside the FSM you cant see the variable values, all it says is "using templates", this makes it difficult to track down errors. Is there some way to see them?

Cheers
Jonas

8
Playmaker Help / RunFsm Template hiding local variables
« on: June 06, 2013, 04:19:46 AM »
Hi,
When you set a fsmtemplate in the RunFSM action is there a way to hide variables that are local to the template?

Cheers

9
Feature Requests / IntAsEnum attribute
« on: June 06, 2013, 12:09:05 AM »
Since there is no FsmEnum, could we instead have an attribute to show an int as an enum e.g.

[IntAsEnum(typeof(MyEnum))]
public FsmInt myIntValue;

This would show a dropdown with all the enum values, while still being able make it a variable.

Cheers

Pages: [1]