[Bug] BinarySelector and Breakpoint

Forums 💬 NodeCanvas ⚙️ Support [Bug] BinarySelector and Breakpoint

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17064
    psykaw
    Participant

      I think there is a bug with BinarySelector and breakpoint.
      If I set a breakpoint on a BinarySelector which is not dynamic, it’s always the true connection which is executed (cf screesnhots).
      BinarySelector BugFalse Condition
      The breakpoint puts node status at Running and the BinarySelector check if status == Resting to check conditions.
      Why breapoint puts node status at Running ?

      Thanks.

      #17067
      Gavalakis
      Keymaster

        Thanks for the report.
        It’s actually a bug in the way I handled breakpoints when Unity Editor is also paused and not a problem with Binary per-se.
        Here is the fix:
        1) Node.Execute, right after the log:

        2) Change the YieldBreak coroutine to this:

        Breakpoints puts node to Status.Running to fake mid code execution and since the breakpoint is handled before the node is actually executed.

        Thank you.

        #17066
        psykaw
        Participant

          Hey,

          The fix doesn’t solve the issue. Binary Selector execute true connection even if condition return false.

          #17065
          Gavalakis
          Keymaster

            Oh. I’ve mised the part where you said “when it’s not dynamic”.
            So, I took another look at this. Probably the best “global” fix is to use a flag that a breakpoint is reached and reset the flag (as well as the status of the node back to Resting after resuming. Here is the current code changes which I’ve tested and work fine so far:

            You will of course need to add a private bool breakPointReached; to the class as well.

            Thanks.

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