Unit Selection
  • Welcome
    • πŸ‘‹Hello
    • πŸ—ΊοΈRoadmap
    • ⛑️Support & Community
    • πŸŽ“Changelog
  • Getting started
    • πŸ”ŒImport package
    • πŸ› οΈAdd selection to scene
    • 🦲Add selection to units
    • β›³Add visuals to units
  • How it works
    • 🎯Active Selections
    • 🫡Unit Selector
    • πŸ”’Quick Access Selector
    • ⬛Selection Area
      • πŸ”²2D Rectangle
      • 🧊3D Cube
    • πŸ’ Selectable Unit
      • πŸ“Selection Bounds
      • β­•Selection Indicator
    • Selectable Group Unit
    • ⌨️Input Controls
    • πŸ‘·β€β™€οΈUnit Management
Powered by GitBook
On this page
  • Overview
  • Supported Components
  • Collider
  • Renderer
  • Custom
  1. How it works
  2. Selectable Unit

Selection Bounds

Learn about how custom selection bounds are defined.

PreviousSelectable UnitNextSelection Indicator

Last updated 1 year ago

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.

public interface ISelectionBounds
{
    public Bounds SelectionBounds { get; }
}

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 or send us an .

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.

πŸ’ 
πŸ“
Discord
Email