πSelection Bounds
Learn about how custom selection bounds are defined.
Overview
You might want bigger or smaller selection bounds than what collider or renderers on the units would allow you. For this there is this interface which is used for defining completely custom and adjustable selection bounds on units.
Supported Components
There are few components already provided by Unit Selection package for easy setup. Pick the one which suits your game needs best. If you do not find one that does, you can implement your own and if you believe a common use case is missing, feel free to drop a feature request on Discord or send us an Email.
Collider
Add ColliderSelectionBounds component to selectable unit and specify which collider it should use for bounds.
Renderer
Add RendererSelectionBounds component to selectable unit and specify which renderer it should use for bounds.
Custom
Add CustomSelectionBounds component to selectable unit and specify the offset and size that will be used to create the custom bounds. Offset is applied to the unit's original transform position, taking into account rotation and uses the specified size to define the bounds.
Last updated