Command agents with basic real-time strategy (RTS) control type input. Displays a selector marquee in a specified color, with selected agents displaying a circular icon at their base.
Command agents with basic real-time strategy (RTS) control type input. Displays a selector marquee in a specified color, with selected agents displaying a circular icon at their base.
Drag-select single or multiple agents by left-click, and then direct agent(s) to a waypoint on the plane designated by right-click of the mouse. Agents will navigate around obstacles to reach a set waypoint and stop. Navigation of agents can be interrupted by another right-click of the mouse; agents will then navigate to that new waypoint location.
Assets/Ride/Examples/AgentCommands/ExampleAgentCommands.unity
Utilize the commands and selector API for your scene and its agents by adding the ExampleAgentCommands script and SelectorUI prefab.
First, add this script to an object in your scene to enable the RTS type of unit command.
Next, import the SelectorUI prefab into your scene to enable rectangular selection and highlight of units by way of the RectSelectionDisplay script.
This prefab also contains the necessary EventSystem and Canvas child prefabs.