Skip to main content

Items

The system uses items to denote interactable objects within the scene which are of interest for the agent.

Setup

Add your object to your scene and add the component 'Item'. This will make the system able to denote that the Unity GameObject is an item within the scene.

Denote what an Item is

You can indicate what an item is by setting the name of the item to a value within a enumerator. There are more wider categorisation of them by setting the type, for example an apple could belong to a type food.

info

Adding more item names or types is done through updating the enumerators. These can be found in the folder Script -> Enums -> Item. When saved the dropdowns will update.

Statuses

Items have two main statuses that effects how agents interact with them; reserved and in use. The reserved status is when an agent has stated to the system that it is going to use this item. It will for the most part stop all other agents from considering to use it. The second one in use is when an actual agent is using the item, this can be used to trigger other behaviours or animations.

Ownership

Items within the scene will be owned by different agents. Personal rooms within a home will have all items within being owned by the agent who room it is. Shared spaces within a home will be owned to all agents who live at the home. Workplaces can own items anywhere within the scene but need to be added to the building 'owned items' list. Ownership acts as a scope which agents can find items within which is set on the action they are trying to do.

Interactor

These are used to make the scene more reactive to an item being used. Each interactor can a Unity GameObject assigned to it which is used to mark a location affected by it.

Impact

There are three main behaviours an interactor can have, disable and enabling a Unity GameObject and spawning an item. These can be triggered either once per a cycle (in use and then not in use), on setting in use or even after a certain number of times.

Using

Each item can have many interactors and each will get triggered on setting of the item in use. These can be added using the 'Add Component' button on objects within the inspector in Unity, just type in 'interactor'.