So I am new to FlowCanvas and therefore this might be me doing something wrong, or it could be a bug?
Screen 1 shows that I have a Set Active and Set Transform with a Game Object set. When I run everything works out just fine. But when I perform an Android or iOS build, the Game Objects are being set to null as seen in screen 2.
I have noticed that my Hierarchy is showing an ‘Untitled’ scene and nothing else during the build, after the build, it returns to normal (this may or may not be relevant).
The problem you are facing is a typical Unity pitfall, that can easily be missed. What I mean by that, is that by Unity standards and workflow limitation, Assets (like Graph Assets are for example in FlowCanvas), can not have Scene object references and the references will not persist.
Thus, the problem here and the reason why this is happening, is because the flowScript you are using is an Asset reference (instead of a Bound one).
The simplest solution to that Unity limitation, would thus be to convert the flowScript that the FlowScriptController is using into a Bound graph. This can easily be done with the “Bind Graph” button on the FlowScriptController inspector. When a graph is bound, it will become part of the FlowScriptController which exists in the scene and as a result, you will be able to have Scene object references assigned to the graph without any problems.
Another solution if the above is not adequate, would be to use Blackboard Variables and feed those variables to the various graph node inputs instead of directly assigning the references. Because Blackboard, is a component that is attached on the FlowScriptController gameobject and thus lives in the scene as well, it CAN have scene object references as normal.
Please let me know if that clarifies the reasons and whether or not this helps and works for you. 🙂