Unit System
  • WELCOME
    • πŸ‘‹Hello
    • πŸ—ΊοΈRoadmap
    • ⛑️Support & Community
    • πŸŽ“Version - Changelog
  • Getting Started
    • πŸ”ŒImport Package
    • βš™οΈConfiguration
    • πŸ” Database
    • πŸͺŸManager Window
    • Creating a new Scene
      • Player Camera
      • Set up Player
      • Set up Player UI
      • Set up the Game World
    • Create Units
      • Resource (Crystal)
      • Research (Crystal age)
      • Resource node (Crystal Node)
      • Resource collector (Crystal)
      • Combat unit (Mage)
      • Production unit (Mage Tower)
      • Faction (Purple Cubes)
  • How it works
    • Overview
    • Modules
      • Resource
      • Production
      • Population
      • Garrison
      • Collection
  • Integration
    • Unit Selection
    • Unit Formation
    • Object Placement
Powered by GitBook
On this page
  • Step 1 (Asset)
  • Step 2 (Prefab)
  • Step 4 (Add to Production)
  1. Getting Started
  2. Create Units

Resource collector (Crystal)

Steps how to create a resource collector.

PreviousResource node (Crystal Node)NextCombat unit (Mage)

Last updated 2 months ago

Step 1 (Asset)

To create new resource collector unit we must again first create a AUnitSO data set with capabilities, before we create a prefab.

  1. Select Unit type of asset

  2. Click Create New button

  3. Set desired name and description of the new unit

  4. Set cost to the unit like resource, wood, etc.

  5. Set production attributes like Population Consumption if applicable for your project; it is used in Demo scene.

  6. Set requirements research or other producible if applicable, like the new Crystal Age research.

  1. Select Capabilities tab

    1. Add Resource Collector capability to support unit collecting resources from resource nodes.

    2. Add Health capability so that unit may be destroyed by enemy units.

    3. (Optional) Add Builder capability to support building other constructions, this is relevant only if the collector is also a general worker for the player.

Step 2 (Prefab)

After data asset is created, we can proceed with creating a Unit prefab:

  1. Click on the Create Prefab button if you wish for prefab to be created automatically.

  2. Now click Open Prefab to and open Scene window to see it. You should see 3 components already present (Unit, Health, Resource Collector).

  3. Configure visuals as desired, by default a primitive cube model is present.

  4. Add collider to the root game object, primarily for selection and projectile collisions.

  5. Set Layer of the root object (the one with collider) which is used for selection and projectile collision.

  6. Add movement components. This is required if the unit is to support movement with provided tasks and behaviours (collection, combat, building, etc.).

    1. If you are using Unity's NavMesh, you can attach NavMeshAgent for navigating the object and provided NavMeshMovement components. (If you are integrating it with Formation asset, use FormationNavMeshMovement)

    2. If you are using different navigation system or want to customise your movement component, create a new MonoBehaviour script and implement UnitMovement interface on it.

Step 4 (Add to Production)

Now that you have a new production object ready, you must add it to any unit which supports Production itself. You can add this to any existing production structures present in Demo assets, or create your own following the guide for .

Mage Tower
Crystal Collector Main 1/2
Crystal Collector Capabilities 2/2
Crystal Collector Prefab