🏹
Unit Formation
  • WELCOME
    • πŸ‘‹Hello
    • πŸ—ΊοΈRoadmap
    • ⛑️Support & Community
    • πŸŽ“Changelog
  • GETTING STARTED
    • πŸ”ŒImport package
    • βš’οΈAdd unit placement to scene
    • 🚢Add unit movement
    • πŸ“½οΈPosition units in Editor
  • HOW IT WORKS
    • πŸ‘‡Formation Placement
    • πŸ¦₯Unit Formation
    • πŸ“ΊPlacement Visuals
    • πŸ–±οΈInput
    • 🎽Formations
  • Integrations
    • 〽️A* Pathfinding Project
      • πŸ”ŒImport package
      • βš’οΈAdd unit placement to scene
      • 🚢Add unit movement
      • πŸ“½οΈPosition units in Editor
Powered by GitBook
On this page
  1. GETTING STARTED

Add unit placement to scene

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

PreviousImport packageNextAdd unit movement

Last updated 1 year ago

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.

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!

βš’οΈ
Formation Placement & Unit Formation component configurations