Sets the weight for the goal specified by subscript syntax.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
A weight to be applied to the goal’s influence on an agent’s speed and direction.
A goal object.
This method is equivalent to the
set method, but allows access using subscript syntax. Like that method, setting a goal weight by subscript adds the specified goal to the behavior if not already present.