Bug Reporting > PlayMaker Bug Reporting

SetFsmVariable sometimes setting wrong values

(1/2) > >>

PollitronicDev:
Hello there!

This is my setup:

- I have a prefab with 2 FSMs: FSMa and FSMb.
- Each of these FSMs has a (float) variable: VarA and VarB.

Now I need to set VarB (in FSMB) to the value of VarA (in FSMA), so from FSMA I use a SetFsmVariable action as shown in the image.

The problem is that, when running an instance of the prefab and executing the action, the value passed to VarB is always the value VarA had originally (the one set in the Variables tab). In other words, the action ignores any changes done at runtime to VarA, it always sends the original value. I suspect it might be sending the value in the prefab instead of the one in the instance.

Strangely, there was one execution in which the values passed were correct. However, the next time I executed the game (I changed nothing) it went back to the wrong behaviour, and kept like this.

Any idea of what can be causing this (bug?), or if I'm doing something wrong?

Thanks in advance!

miguelfanclub:
I suspect is related to this as well:
https://hutonggames.com/playmakerforum/index.php?topic=19540.0

jeanfabre:
Hi,

On what version of Unity are you working?
 
Bye,

 Jean

PollitronicDev:
    Hello there, sorry for the delay!

    Currently I'm using Unity 2018.2.3f1

    Thanks and regards!

jeanfabre:
Hi,

 Could you share the scene you are testing this with? all seems well here.

Bye,

 Jean

Navigation

[0] Message Index

[#] Next page

Go to full version