Hello everyone,
I started messing with the RunFSM action (BTW still not documented?) and I have difficulties passing a GameObject variable to the template. String values work fine. Is that a known bug?
-----------------------------------
Short story:
- I use the playmaker 1.7.3f1 and Unity 4.2.1f4, clean install, no other plugins
- passing values via the RunFSM dynamic action's parameters
- no default values in the template are set
- gameObject variable has been correctly initialized after FSM startup/before running the RunFSM action - found a child GO by name (checked in breakpoint)
- the GO value is NOT passed, in the template it reads None (checked in breakpoint)
- other string variables are passing ok
- the FSM is on a prefab if that is relevant, but tried it on a plain GO and still not working
Workaround:
When I pass just the child GO's name (strings work) to the template and find the GO there, it works fine.
However, I would expect, that this was noticed and reported long ago. I searched the forums and no match. Can you please confirm that this is a bug or am I doing something wrong?
Many thanks!
----------------------------
Long story:
I have a main FSM that is ment to read player inputs (controller) and then forward the input to the actual logic represented by FSMs on child game objects.
The main FSM therefore has one large looping state where all the input is processed and sent to children.
I figured it would be cleaner to separate those actions by subject (movement, mouse aim, ...) and create a template for each. Then the looping state would just call RunFSM for each template and the templates would forward the controls to their respective targets.
When I moved the working actions into a template and added the RunFSM action, the string variables are passing ok, but the gameObject variable not.
Timeline:
1) main FSM starts, goes to init state where I lookup the child GO (confirmed to be found in a breakpoint)
2) main FSM goes to looping state
3) in a loop calls RunFSM for my template
4) as a parameter of the action, I set the gameObject value
5) template starts and runs an init state where the gameObject variable is None (checked in a breakpoint), the string variables are passed ok