โš’๏ธAdd unit placement to scene

Step-by-step guide to add unit placement to your scene

This package supports Unity's both new InputSystem and the old Input for player controls.

Steps to setup:

  1. Drag & drop prefab FormationPlacement into your scene.

  2. Configure FormationPlacement component:

    1. Input section, by default all layers are selectable for raycasts.

    2. Visual section, by default formation will be calculated and visible during active placement.

  3. Configure UnitFormation component:

    1. Place units on ground or use their absolute formation position for target.

    2. Add noise to units final target positions.

    3. Connect desired units on existing UnitFormation component

  4. Save Scene.

Formation Placement & Unit Formation component configurations

Customisation

Instead of using existing UnitFormation component, you can add multiple components for each of your unit groups (if units are always grouped) and reference it to the FormationPlacement component in Editor or during Runtime if focused formation has changed.

// Set new unit formation at any time
FindObjectOfType<UnitPlacement>().SetUnitFormation(newUnitFormation);

Ok, You are now done with scene set up!

Last updated