Hi,
I'm struggling with the Playmaker API for hours. Neither in the manual nor here on the forums I have found something that would help me.
I need to get Vector2 values out of a FsmArray variable in code.
After studying a lot of actions I found that I can use the following code to save the array variable to a FsmVar variable
storeValue.SetValue(array.Get(index.Value));
but seemingly only if it is public
[MatchElementType("array")]
[UIHint(UIHint.Variable)]
public FsmVar storeValue;
After that I can read the value of any variable in the array with
storeValue.vector2Value.x
But I don't think that's the right way to use a public FsmVar which is exposed in the editor. It's dirty and complicated.
What is the right way to get Vector2 values out of a FsmArray variable?
Regards
Gustav