FlowCanvas should be able to Tick(Update) manually

FlowCanvas Forums Support FlowCanvas should be able to Tick(Update) manually

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #430
    donaldw
    Participant

      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.

      #436
      Gavalakis
      Keymaster

        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

        #443
        donaldw
        Participant

          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.

          #445
          Gavalakis
          Keymaster

            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.

            #457
            donaldw
            Participant

              GR8!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.