Editor
Last updated
Last updated
The Formation Kit prefab includes 11 sections that let you customize your formation and visualize it directly in the editor.
The Type variable lets you select the formation shape to generate, such as box, circle, triangle, and more.
The Mesh variable lets you assign a MeshCollider, which the formation uses to follow the shape of the mesh. This is only required for the Mesh type, while the Polygon type requires a PolygonCollider2D. Other formation types do not need a collider.
The Mode variable lets you choose whether the formation operates in a 3D or 2D environment, adapting placement accordingly.
The State variable lets you choose whether the GameObjects in the formation are spawned as active or passive. If set to passive, you can activate them later through code, as explained later in this documentation.
The Fill variable lets you choose whether to place objects inside the selected shape or only along its border.
The Direction variable lets you set the orientation the spawned objects will face within the formation.
The Color variable lets you change the gizmo color used in the editor to show the placement of objects in the formation.
The Prefab variable lets you assign a prefab that will be spawned within the formation.
The Count variable lets you specify the number of objects to spawn in the formation.
The Spacing variable lets you adjust the distance between objects in the formation.
The Scatter variable lets you add randomness to the positions of objects in the formation for a more scattered look.