Populating
Population of the scene is handled for the most part by the system. The system is setup to allow for different rules on spawning to be setup however there is only one currently.
Population Region
This is used to denote an area within the scene which should be populated. More details can be found here. ADD IN LINK
Character Pool
This is a list of models to use for your agents, you can have as many as you like of these so each population region could in theory has it own to give it a unique feeling if you so wish.
Spawning
This is responsible for collecting all the data together and applying a strategy to spawning in the agents. Strategies are explained below
Random
Works by randomly selecting a house and workplace within the population region and spawns an agent which uses both slots (the house and a workplace role). When a workplace or house becomes filled it is removed from the pool and the process repeats with the smaller pool. This is repeated until the max population is reached (based on the smallest between jobs and housing) or a max iteration count of the max population minus one times by ten (for example a max population of 10 would be 90 iterations. Agent character model respects the conditions setup on the model being used and is randomly selected from the pool dictated by the population region.
Bespoke Agents
The system also supports the addition of bespoke agents being setup within scenes. This allows for unique character models along with specific setup of building ownership.
How to setup
This can be done easily by adding the character model to the scene which you wish making sure it has a Unity Animator component on the root of the character and any collision. Then add the 'Bespoke Agent' component using the 'Add Component' button on the Unity GameObject which is the character model. Then select the workplace (including the job they have) and house. On play the system will handle the rest.