Skip to main content

Agent Inventory

Agents within your scene each have their own inventory system. This is used to carry items within the scene and is easy to setup.

Slot System

Each item must be carried within a slot and a slot only can take one type of item, these represent position items can go onto on an agent. When an item is picked up the Unity Rigidbody kinematic is turned off and it is positioned by the item handle point or it's origin point to the position of the slot. It is then made a child of the slot meaning it will move with any positions and rotating the slot has applied to it. On dropping the item it will be orphaned from the slot meaning any movement will not be applied and the Unity Rigidbody kinematic will be enabled meaning gravity will take affect. Slots can be added to agents by adding components to the model used for the agent, these can go directly on the bone game objects.

In Use

This means that the slot currently has an item in it.

Using Slot

These are slots which count as using an item, for example hands which the agent would use the item in.

Total

This is the amount of the same object the agent is carrying in this slot, when agents pick up items they will attempt to use the same slot if it is the same type of item.

Item Sizes

Items can come in a range of sizes, the default list is; small, medium, large and hidden. These are listed in size order (small being small, hidden being the biggest). Items will have to be the exact size unless you enable allow smaller.

Interacting With Slots

Every agent will have their own slot service which manages the relationships of these components under the hood of the ownership service. The ownership service also contains information about buildings, rooms and possible other items agents have access to but this can be filtered using the ownership flag.