The character controller is seamlessly integrated with the Ultimate Inventory System allowing you to use the Ultimate Inventory System inventory rather than the inventory included with the character controller. The integration includes the Ultimate Inventory System Bridge component which is responsible for the communication between the two assets. This integration can be downloaded from one of the pages listed below.
The integration includes two databases: IntegrationDemoInventorySystem and EmptyCharacterInventoryDatabase. The IntegrationDemoInventorySystem database us used within the Ultimate Character Controller demo scene. To get started within a fresh database you can use the EmptyDatabase which contains the minimum for the Ultimate Character Controller integration. This database can be duplicated from the Ultimate Inventory System’s Setup Manager:
The Ultimate Inventory System allows for flexibility in how you setup your inventory but the integration does require some high level setup in order to be able to work with the character controller.
The following categories are required:
- Equippable: The Equippable category specifies the items that can be equipped, such as an assault rifle or a sword. While this high level category is required, the Ultimate Inventory System allows you to nest categories so you can have any category structure beneath this.
- Consumable: The Consumable category specifies the objects that can be consumed by items, such as assault rifle bullets or mana. Inventory objects that are not used by the item system, such as a potion.
If your character can equip multiple of the same item, such as dual pistols, then the following category is required:
- Multi Item: Parented to the Equippable category, the Multi Item category is an optional category which specifies that the same item can be equipped in multiple slots. Examples include dual pistols or the grenade which can be equipped in the left or right hand. Any item which satisfies this requirement must inherit the Multi Item category. Items which can be dual wielded but are not of the same item type, such as a sword and shield, do not need to be parented to the Multi Item category.
The integration uses a variety of attributes in order to perform different functionality. The following Item Category attribute is used:
- ExposedItemSet: A boolean which indicates if the category should be exposed to the Item Set Manager.
- CanEquipFromMenu: A boolean which indicates if the category within the Item Set Manager should be able to be equipped from the menu. In the demo scene this is used by the Right and Left Hand Grenade categories to prevent that Item Set from being equipped when the grenade is equipped from the menu.
The following Item Definition attributes are used:
- Prefab: A GameObject which is used by items which are not in the Muti Item category. This attribute specifies the prefab that should be spawned. This prefab should be a runtime pickup prefab.
- Prefabs: A GameObject which is used by items which are in the Multi Item category. This attribute specifies the set of prefabs that should be spawned. Each element within the array corresponds to the slot that the item is spawned.
- ExclusiveEquip: A bool which specifies if the Multi Item is equipped separately from itself. In the case of dual pistols, Exclusive Equip would be false because multiple pistols can be equipped at the same time. In the case of a grenade which can be equipped in either hand the Exclusive Equip value should be true since only one item can be equipped at a time.
The following Item attributes are used:
- IsEquipped: Defined on the Equipped Item Category, specifies if the item is currently equipped. This is used by the inventory UI to show if the item is equipped.
Ultimate Character Controller
First Person Controller
Third Person Controller
UFPS: Ultimate First Person Shooter
UTPS: Ultimate Third Person Shooter
UFPM: Ultimate First Person Melee
UFPM: Ultimate Third Person Melee
- Install the integration from above.
- Duplicate the EmptyCharacterInventoryDatabase from the Inventory Manager.
- Open the Integrations Manager from Tools -> Opsive -> Integrations Manager. Select the Integration Inspectors tab.
- Drag your character into the Object field. This character must first be setup with the Character Manager. Select Setup Character.
- Ensure you have setup your inventory according to the structure described within the Setup section.
- Specify the Equippable, Consumable, and Multi Item categories within the Ultimate Inventory System Bridge. The Multi Item category is optional.
- Create your Item prefab using the Runtime Item Pickup steps. Item Types from the Ultimate Character Controller do not need to be created as you should instead use the Item Definitions.