Occupants are the entities that reside inside of buildings. They could be soldiers (like in the sample) but also dragons, cars or even furniture. The default occupant has no behaviour (other than providing the ability to train and dismiss them) but the video tutorials show you how you can add behaviour to an occupant.

Like a building the occupants behaviour is defined by OccupantType which is in turn defined by a number of parameters.


Configuring New Occupants

Occupants are configured in an XML file just like Buildings. You can use the sample XML file OccupantData.xml as your starting point. You can use any name for the occupant data file as long as you place it in a Unity Resources folder (any folder in the asset directory named Resources).

If you wish to use different XML files you must also set the names in the properties of the OccupantManager object. Note that the extension .xml is not included in the entry; it is however required for the filename.


Occupant Details

For details about configuring buildings see: The Occupant Configuration File

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk