Scene Setup
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:
| Setting | What it does | Default |
|---|---|---|
| Nav mode | Which pathfinding solution the agents use | Unity NavMesh |
| Start time | Time of day a fresh world opens at, in 24-hour HHMM form | 800 (08:00) |
| Start day | Day counter a fresh world opens on | 0 |
| Work behaviour repository | Folder of work trees to load | Demo0.3.0 |
| Need behaviour repository | Folder of need trees to load | Basic |
| Character pool service | Which characters the regions may spawn | — |
| Item name / type / size collections | Shared 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 Mode | What you need in the scene |
|---|---|
NONE | Nothing. Agents will not move — useful only for isolating other problems. |
UNITY | The AI Navigation package, and a baked NavMeshSurface. This is the default. |
ASTAR | The A* Pathfinding Project asset and its graph setup. |
AGENT_NAVIGATION | The Agents Navigation asset and its setup. |
For the default UNITY mode:
- Install AI Navigation (
com.unity.ai.navigation) from Window > Package Manager. - Add an empty GameObject to the scene and add a
NavMeshSurfacecomponent to it. - Set Collect Objects to
All. - 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
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).
- Add
BardTreeModuleBootstrapto an empty GameObject in the scene. - Create module settings via
BardTreeLtd/Civil AI/Module Settings, orBardTreeLtd/Create Module Settings/CivilAI. - Create and assign all three item collections:
Assets > Create > BardTreeLtd/Civil AI/Inventory/Item Name CollectionAssets > Create > BardTreeLtd/Civil AI/Inventory/Item Type CollectionAssets > Create > BardTreeLtd/Civil AI/Inventory/Item Size Collection
- 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 sameBehaviour/Worksubmenu. - Create one simple need tree in
BardTreeLtd/Civil AI/Behaviour Tree Editor, top left you can change mode. - Create one house: select a GameObject and use
BardTreeLtd/Civil AI/Setup/Templates and Actions, or addBuildingServicemanually. - Create one workplace the same way, with one role that matches a job in your work tree.
- Create one population region from
BardTreeLtd/Civil AI/Setup/Templates and Actions. - 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. - 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 StartedBardTreeLtd/Civil AI/Module SettingsBardTreeLtd/Civil AI/Behaviour Tree EditorBardTreeLtd/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.