Placement Visuals
Detailed information about how visuals are shown to the player and how to create your own.
Last updated
Detailed information about how visuals are shown to the player and how to create your own.
Last updated
These features are optional and placement is possible without any visuals.
Using the provided LinePlacementVisual component, you can render direction with LineRenderer with two points, start and finish. The component only manages the renderers state, for customisation of line visuals, configure LineRenderer component to change its thickness, material, shadow and more.
When UnitPlacement has enabled alwaysCalculatePositions
, then you can also use FormationIndicatorVisual component to show positions of unit formation while player is placing the new position and direction of the formation.
To use this component you need to specify:
Unit Indicator Prefab used for unit position indicator in a formation
Hide with delay enable and specify delay if formation indicators should persist after placement is no longer active.
APlacementVisuals is a component for utilising visuals when placing a formation in world environment with FormationPlacement. This can be extended to support any type of visuals.
Look for APlacementVisuals in project to get full information about how this one communicates with the placement component. Once you implement your own, add it to the list of visual renderers on FormationPlacement component and you're good to go!