> For the complete documentation index, see [llms.txt](https://travljen.gitbook.io/unit-formation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://travljen.gitbook.io/unit-formation/getting-started/add-unit-placement-to-scene.md).

# Add unit placement to scene

This package supports Unity's both new `InputSystem` and the old `Input` for player controls.&#x20;

**Steps to setup:**

1. Drag & drop prefab <mark style="color:green;">**FormationPlacement**</mark> into your scene.
2. Configure <mark style="color:blue;">**FormationPlacement**</mark> 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 <mark style="color:blue;">**UnitFormation**</mark> 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 <mark style="color:blue;">**UnitFormation**</mark> component
4. Save Scene.

<figure><img src="/files/4xjDJ8FWPbwWhO8hur3A" alt="" width="563"><figcaption><p>Formation Placement &#x26; Unit Formation component configurations</p></figcaption></figure>

#### Customisation

Instead of using existing <mark style="color:blue;">**UnitFormation**</mark>**&#x20;component**, you can add multiple components for each of your unit groups (if units are always grouped) and reference it to the <mark style="color:blue;">**FormationPlacement**</mark> component in Editor or during Runtime if focused formation has changed.

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

Ok, You are now **done** with scene set up!&#x20;
