playMaker

Author Topic: RunFSM not passing gameObject - possible bug?  (Read 4279 times)

diskobolos

  • Playmaker Newbie
  • *
  • Posts: 6
RunFSM not passing gameObject - possible bug?
« on: September 04, 2013, 05:32:00 PM »
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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: RunFSM not passing gameObject - possible bug?
« Reply #1 on: September 04, 2013, 09:07:44 PM »
I just did a quick test here and the Game Object parameter was passed correctly to the template instance... I'd need to look at your setup to debug it.

Can you submit a bug report? Main Menu > PlayMaker > Tools > Submit Bug Report.

After you get the link to the bug can you attach a repro project with steps to reproduce the problem?

diskobolos

  • Playmaker Newbie
  • *
  • Posts: 6
Re: RunFSM not passing gameObject - possible bug?
« Reply #2 on: September 05, 2013, 04:16:35 AM »
Bug sumbmitted, waiting for the e-mail.
About the sample project - it would not be wise to attach the entire (even if sample project), it contains the whole playmaker package. Should I delete it from there before sending? I dont know what is your policy about that...

There should not be any relevant files for the bug to reproduce.
The template is saved elsewhere.
Thanks.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: RunFSM not passing gameObject - possible bug?
« Reply #3 on: September 05, 2013, 10:34:26 AM »
The bug database is not public, so you can safely attach the whole project to the bug. That is actually preferred since it reduces the number of steps to repro the bug...

Thanks!

diskobolos

  • Playmaker Newbie
  • *
  • Posts: 6
Re: RunFSM not passing gameObject - possible bug?
« Reply #4 on: September 05, 2013, 11:11:38 AM »
I have the sample project ready, the archive has 6+MB (just plain project, no textures or anything).
Now how do I upload it to the bug?

I looked at FogBugz and there is no way for me to log in, only to send a followup via e-mail and hopefully the attachment will get to you (according to their docs).
On the other hand, sending an email with a 6+MB attachment is not a good practice, am I getting it right?

Maybe you should document the correct way in the bug section of the forum and sticky it, so that other users have it easier too.
Many thanks.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: RunFSM not passing gameObject - possible bug?
« Reply #5 on: September 05, 2013, 11:39:33 AM »
An attachment should work.

I'll add a note about attachments to the sticky topic on submitting bug reports...

jinjin

  • Playmaker Newbie
  • *
  • Posts: 1
Re: RunFSM not passing gameObject - possible bug?
« Reply #6 on: September 27, 2013, 07:02:42 AM »
Any updates on this?

I noticed on the release notes that:

1.7.4
Fixed Run FSM input parameters not updating when using variables that changed at runtime (#796).

However, I'm seeing that using 'Run FSM' action fails to work properly when being run from a Host template.

Creating a gameobject - and adding a PlayMaker FSM, then selecting a template that uses 'Run FSM' inside - fails to pass any properties other than strings to the Sub FSM.

I initially noticed it not passing objects- but I can also see that it won't pass Vector3. It seems as noted in previous threads, only strings seem to get passed through.

Bug seems visible in 1.7.5 :(

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: RunFSM not passing gameObject - possible bug?
« Reply #7 on: September 27, 2013, 08:42:57 AM »
I'll look into this setup. I'm not sure that we have that case in our automated tests - if not I'll add it and fix this for 1.7.6. If you haven't already can you submit a bug report (PlayMaker > Tools > Submit Bug Report). Thanks!

diskobolos

  • Playmaker Newbie
  • *
  • Posts: 6
Re: RunFSM not passing gameObject - possible bug?
« Reply #8 on: September 27, 2013, 09:42:07 AM »
Hello, I got a message that the bug reported by me was really a bug and was fixed, but did not have time to test the modified action yet.
I can't tell if your scenario is the same issue.

thrif_ash

  • Playmaker Newbie
  • *
  • Posts: 1
Re: RunFSM not passing gameObject - possible bug?
« Reply #9 on: September 29, 2013, 10:57:08 PM »
Hello,

I was having a similar issue in 1.7.3 and found this post so I updated to 1.7.5.f2 and it seems to be working now.