Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: tropical on February 17, 2016, 06:54:17 AM
-
Hi,
I try to use an FsmArray variable (Playmaker 1.8+) containing Ints in a custom action. How can I specify the type?
If I use [ArrayEditorAttribute(typeof(int))] or [ArrayEditorAttribute(typeof(FsmInt))] the action does not accept array variables of type 'Int' but only of type 'Object -> Int32' or 'Object -> FsmInt'.
Maybe the solution is too simple and I just don't see it...?
Can anyone help?
Thanks.
-
Use the ArrayEditorAttribute with a VariableType. Example:
[ArrayEditor(VariableType.GameObject)]
public FsmArray gameObjects;
VariableType values are Float, Int, Bool etc. Code completion should help you find the type you want.
I'll add some documentation to the wiki...
-
Use the ArrayEditorAttribute with a VariableType. Example:
[ArrayEditor(VariableType.GameObject)]
public FsmArray gameObjects;
VariableType values are Float, Int, Bool etc. Code completion should help you find the type you want.
I'll add some documentation to the wiki...
Thanks, Alex!
I'll try that.