[BUG] Disabling NavMeshAgent causes error spam

Forums 💬 NodeCanvas ⚙️ Support [BUG] Disabling NavMeshAgent causes error spam

  • This topic has 0 replies, 2 voices, and was last updated 4 years ago by Gavalakis.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15942
    covis
    Participant

      Disabling NavMeshAgent component causes error spam when NodeCanvas graph inspector window is open.

      NodeCanvas v3.20
      Unity 2020.3.5f1

      Repro steps:

      1. Create GO with NavMeshAgent and FSM owner and bake NavMesh on a plane.
      2. Bind any NavMeshAgent property to blackboard.
      3. Create setup like in the picture (important to have atleast 1 task has the bound property used.)
      4. Press play and disable NavMeshAgent component.
      5. Get spammed by this error as long as u have graph inspector open and focused.

      “IsStopped” can only be called on an active agent that has been placed on a NavMesh.
      UnityEngine.StackTraceUtility:ExtractStackTrace ()

      #15945
      Gavalakis
      Keymaster

        Hello,

        You are right. It is a small bug related to task warnings. To fix this, please open up Task.cs file and replace the whole “GetWarningsOrError” method with the code bellow:

        Only line #36 (as shown in above code lines) is changed actually, but I copy/pasted the whole method for your convenience.
        Let me know if that works for you.
        Thanks!

        #15944
        covis
        Participant

          This does fix the issue allowing to view graph inspector without getting spam. However if u happen to select state node that has these variables in use same problem still persists.

          #15943
          Gavalakis
          Keymaster

            Hello again,
            You are right. Please open up BBParameterEditor.cs and change line #78 to the following:
            if ( required && !string.IsNullOrEmpty(bbParam.name) && !bbParam.isDefined && bbParam.isNull ) { EditorUtils.MarkLastFieldWarning("An instance is required but currently resolves to null. If it is set in runtime you can ignore this warning."); }

            Thanks 🙂

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