Hello,
I was showing a friend how could you modify a public variable in a .cs file from a Playmate FSM, and realized how convoluted is the way I'm going through it. I'm wondering now if there's a better way.
Basically we have this C# script that has a public int variable called Score.
What I want is for certain action in a state to ADD 20 to that variable. I thought that Set Property would do it, but of course, set property doesn't allow operators, it just set the value to 20.
So I had to Get the property, store it in a Playmaker variable, then use the int operator action from Playmaker to add 20 to that playmaker variable and then Set the Score property = playmaker variable value.
it seems like a lot of actions to do a simple operation. Is there a better way?
Thanks!