Creating an enum for use in FlowCanvas can be done in code and is not possible through the interface. Creating an enum though is very easy. Here is an example:
Then to use this in FlowCanvas, you simply need to add it in the Preferred Types Editor:
– Open up “Tools/ParadoxNotion/FlowCanvas/Preferred Types Editor”.
– Search “MyEnum” at the top and add it in the list of types with the + button.
Finally, to branch the flow based on an enum, you can use the Switch Enum node (Flow Controllers/Switchers/Switch Enum) and select your enum you want to switch upon with the relevant “Select Type” button in it’s inspector. In this case, MyEnum.
Just as a clarification, this can be done with pretty much ANY script.
No need to stick to enums: I was able to modify the position weight of Final IK’s FBBIK component (full Body Biped IK or something like that) by simply adding such script through the described above method.
After adding it to the collection, I was able to instantiate on the graph a reference to it and simply get the necessary values and method calls to the things I needed.
It really is a game changer – one of the best things about this package as it allows one to prototype things pretty quickly – and more often than not these don’t even need to be ported to actual C# code. At least I haven’t felt much of a hit in performance.