Returns the weight associated with the goal specified by subscript syntax.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
A goal already included in the behavior’s set of goals.
The weight to be applied to the goal’s influence on an agent’s speed and direction, or
0 if the goal is not in the behavior.
This method is equivalent to the
weight method, but allows access using subscript syntax.