Small change request to support calling EndAction from OnExecute

Forums 💬 NodeCanvas 🗨️ General Discussion Small change request to support calling EndAction from OnExecute

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13020
    patrickl
    Participant

      Hi,

      I have some cases where I want to immediately exit a action from OnExecute however it can cause issues where the current state becomes null during the FSM OnGraphUpdate. I’ve manually patched this myself but I have to keep re-applying it when I upgrade. Would it be possible to add this in for the next update? My change is in bold:

      protected override void OnGraphUpdate() {

      //Update current state
      currentState.Execute(agent, blackboard);

        //this can only happen if FSM stopped just now (from the above Execute)
        if ( currentState == null ) { Stop(false); return; }
      }

       

      I also had some obsolete API warnings when updating to latest version. I let Unity update the usages and everything seems fine but thought I would point it out. I’m on latest Unity 2021 LTS

      Thanks
      Patrick

      #13023
      Gavalakis
      Keymaster

        Hello there. What NodeCanvas version are you using please? I am asking because there actually is such a call there.

        Or do you mean this call being right after the currentState.Execute call?

        Let me know. Thanks 🙂

        #13022
        patrickl
        Participant

          Yeah, after the currentState.Execute call. So it does the same check as it does after Update call.

          #13021
          Gavalakis
          Keymaster

            Alright, no problem. I will add that for the next version 🙂

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