I have the following BT to initialize a gameObject:
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:
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?
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?
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