"Get Closer from" not saving the GameObject correctly

Forums 💬 NodeCanvas ⚙️ Support "Get Closer from" not saving the GameObject correctly

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19357
    karmelov
    Participant

      Hello,

      I have the following BT to initialize a gameObject:
      BT

      As you can see in the object BB, I have a list<GameObjects> where I store all the “Holes”, and a GameObject name HomeHole that should store the closest Hole:
      BB

      However, the “Get Closer from” Task seems to not be working correctly.
      I get the following error when running my game:
      “A required BBVariable value for Task ‘Get Closer Game Object In List’, is not set! Field: ‘saveAs'”

      And also the Task details show the field in red:

      Is there something wrong with the task, or am I misusing this task?

      Thanks,

      #19360
      karmelov
      Participant

        I just realized that I won’t get this error if I assign a GameObject to the “HomeHole”, which doesn’t really make sense since this field will be used to store information, not to retrieve info. Is this a bug?

        #19359
        Gavalakis
        Keymaster

          Hello,

          You are using it correctly. It’s a mistake in the task.
          Please open the task script GetCloserGameObjectInList.cs (clicking the script icon in the inspector) and simply remove the [RequiredField] attribute that is over of the ‘public BBGameObject saveAs’ at line #14.

          Thanks for spoting this and the very detailed information you provided,
          Cheers

          #19358
          karmelov
          Participant

            Done. Works like a charm now!!
            Thanks!

            Thanks for spoting this and the very detailed information you provided,

            You are welcome.
            I guess that time I worked as QA finally paid off 😀

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