FlowCanvas Forums › Support › FlowCanvas should be able to Tick(Update) manually
Currently flow canvas is driven by its internal MonoManager, which is driven by Unity MonoBehaviour’s Update() function.
However, in some cases, user may want to Tick(update, or call the IUpdatable) manually. For example, lock-step games need update manually.
Now, by modifying flow canvas’s code by myself, I’m able to achieve this goal. But I think this manually-update feature should be implemented by flow canvas itself.
Hello,
I could add an option in the FlowScriptController to select between “AutoUpdate” or “ManualUpdate” and add a method in there as well to Update the graph manually when “ManualUpdate” is selected. Is this what you suggest?
Thanks
Not quite right.
In my opinion, the interfaces should be like this:
FlowScriptManager.UpdateMode = FlowCanvasUpdateMode.Manual; // 0.1. change the update mode via FlowScriptManager
FlowScriptController.UpdateMode = FlowCanvasUpdateMode.Manual; // 0.2. either 0.1 or 0.2 is ok, but NOT both.
FlowScriptManager.Update(); // 1. manually update all registered flow scripts. this is the MOST important interface I want.
oneFlowScriptController.Update();// 2.1 manually update one speicific flow script
FlowScriptManager.Update(oneFlowSript); // 2.2 either 2.1 or 2.2 is ok, but NOT both.
Hello again,
I’ve added an UpdateMode in MonoManager for the next version soon to be released. I didn’t create a FlowScriptManager, since MonoManager is used for that. So I’ve basicaly went with a similar to your “0.1, 1, 2.1” suggested approach.
By the way, depending on your use case maybe the use of StartBehaviour/StopBehaviour in the FlowScriptController can suffice.
Thanks.
GR8!