Skip to main content
Version: 0.14.0

Scene Setup

This guide matches the current module bootstrap workflow. For the fastest route, pair it with Getting Started.

This page describes the minimum scene ingredients required for a working setup.

The current runtime entry point

For the current source, the scene should use BardTreeModuleBootstrap as the runtime entry point.

Add it to an empty GameObject in your scene.

This bootstrap is responsible for:

  • creating the shared service registry
  • registering installed module registrars
  • initializing modules in the correct order
  • exposing shared services to runtime and editor tooling

Minimum checklist

Your scene should contain or reference all of the following.

1. Bootstrap

  • one GameObject with BardTreeModuleBootstrap

2. Module settings

Open BardTreeLtd/Civil AI/Module Settings and make sure the settings asset exists.

If no settings asset exists yet, let the window create the default one, or use BardTreeLtd/Create Module Settings/CivilAI.

For a first working setup, check these areas:

SettingWhat it doesDefault
Nav modeWhich pathfinding solution the agents useUnity NavMesh
Start timeTime of day a fresh world opens at, in 24-hour HHMM form800 (08:00)
Start dayDay counter a fresh world opens on0
Work behaviour repositoryFolder of work trees to loadDemo0.3.0
Need behaviour repositoryFolder of need trees to loadBasic
Character pool serviceWhich characters the regions may spawn
Item name / type / size collectionsShared item vocabulary used by the editors

Start time is written as a 24-hour clock without the colon, so 800 is 08:00 and 1730 is 17:30.

3. At least one valid building setup

You normally need:

  • one house
  • one workplace with at least one valid work role

Buildings provide the simulation with places that agents can own, use, and travel to.

They also need valid colliders so the scene has reliable physical bounds for building-related setup.

4. At least one population region

Population regions define where agents are allowed to exist and what content they can use.

You can create a region through BardTreeLtd/Civil AI/Setup/Templates and Actions.

5. Behaviour content

Agents need behaviour trees before they can do meaningful work.

At minimum, create:

  • one work behaviour tree
  • one need behaviour tree

Then assign them in Module Settings.

6. Character pool data

The region must have valid characters to spawn. Make sure your pool contains usable entries and that those entries satisfy any configured requirements.

7. Navigation

Agents need valid navigation data that matches the Nav Mode configured in Module Settings. There are four modes:

Nav ModeWhat you need in the scene
NONENothing. Agents will not move — useful only for isolating other problems.
UNITYThe AI Navigation package, and a baked NavMeshSurface. This is the default.
ASTARThe A* Pathfinding Project asset and its graph setup.
AGENT_NAVIGATIONThe Agents Navigation asset and its setup.

For the default UNITY mode:

  1. Install AI Navigation (com.unity.ai.navigation) from Window > Package Manager.
  2. Add an empty GameObject to the scene and add a NavMeshSurface component to it.
  3. Set Collect Objects to All.
  4. Click Bake. You should see a blue navigation overlay appear over your ground geometry.

If the ground has no collider, the bake produces nothing and agents will stand still.

Changing Nav Mode runs a check that the matching packages are installed and blocks the change if they are not, with a warning in the Console. See Pathfinding for the non-Unity options.

If the world is otherwise correct but agents stand still or never complete move-based actions, inspect navigation first.

A reliable first-scene recipe

tip

The fastest first success is not to build this by hand at all. BardTreeLtd/Civil AI/Examples/Create Example Scene generates a complete, working scene in one click — see Your First Scene. Build by hand once you know what a working scene looks like.

If you do want to build it yourself, use this exact shape. Every asset below is created from Assets > Create (the same menu as right-clicking in the Project window).

  1. Add BardTreeModuleBootstrap to an empty GameObject in the scene.
  2. Create module settings via BardTreeLtd/Civil AI/Module Settings, or BardTreeLtd/Create Module Settings/CivilAI.
  3. Create and assign all three item collections:
    • Assets > Create > BardTreeLtd/Civil AI/Inventory/Item Name Collection
    • Assets > Create > BardTreeLtd/Civil AI/Inventory/Item Type Collection
    • Assets > Create > BardTreeLtd/Civil AI/Inventory/Item Size Collection
  4. Create one simple work tree in BardTreeLtd/Civil AI/Behaviour Tree Editor. A work tree needs a job list plus duty, task and action lists from the same Behaviour/Work submenu.
  5. Create one simple need tree in BardTreeLtd/Civil AI/Behaviour Tree Editor, top left you can change mode.
  6. Create one house: select a GameObject and use BardTreeLtd/Civil AI/Setup/Templates and Actions, or add BuildingService manually.
  7. Create one workplace the same way, with one role that matches a job in your work tree.
  8. Create one population region from BardTreeLtd/Civil AI/Setup/Templates and Actions.
  9. Create a character pool (Assets > Create > BardTreeLtd/Civil AI/Spawn/Character Pool) and a pool service (.../Spawn/Character Pool Service), then assign the service in Module Settings.
  10. Set up navigation (see below) and press Play.

Repositories are folders, not single assets: the work and need repository fields in Module Settings take a folder name under Assets/BardTreeLtd/Resources/CIVIL-AI-SYSTEM/BehaviourTree/, not a path to one tree.

Useful editor entry points

  • BardTreeLtd/Civil AI/Help/Getting Started
  • BardTreeLtd/Civil AI/Module Settings
  • BardTreeLtd/Civil AI/Behaviour Tree Editor
  • BardTreeLtd/Civil AI/Setup/Templates and Actions

Resource locations

The current source uses Assets/BardTreeLtd/Resources as the canonical resource root.

That matters when you are looking for generated or module-owned assets such as:

  • CivilAI settings and behaviour-related assets
  • Dialogue assets
  • shared requirements or shared module resources

If you plan to use Dialogue

Dialogue is a separate paid tool that integrates with CIVIL-AI-SYSTEM through shared services and data.

For combined projects, finish the Civil AI setup first, especially item collections, then continue with Dialogue Setup.

If something is not working

Start with Common Issues.