Item Support

When the Items field on the Character Manager is selected the editor will ensure the character is setup to be able to equip items. This will add the Inventory and ItemSetManager components to your character.

It will also create an “Items” GameObject that contains the ItemPlacement component. This is where the CharacterItem will be added.

The first/third person perspective visual object will be placed under the ItemSlots. Each Item Slot should be specified within the Character Manager. All ItemSlots should have a unique ID. If creating a first and third person character then the slot should correspond to the same GameObject on each perspective. For example, slot 0 should correspond to the right hand in both a first and third person perspective.

In the demo scene ItemSlot 0 is the right hand and ItemSlot 1 is the left hand. But there are no limits to the number of ItemSlots. Some slots can be used for other purposes. For example a common use is having a ItemSlot 2 for magic items which can be used at the same time as other items.
ItemSetRule Setup

The ItemSetRule defines how items are equipped. By default the character will have a single ItemSetGroup with the ItemCategory “Items“ containing a IndividualItemSetRule which creates one item set per CharacterItem and places the item in the respective ItemSlot.

ItemAbility setup

The UltimateCharacterLocomotion contains ItemAbilities which interact with the items. The most common abilities to be able to use items are EquipUnequip, Aim and Use. The EquipUnequip ability is required to equip and unequip items. The ability can be set per ItemSetGroup using an ItemCategory as key. Complementary abilities such as EquipToggle, EquipNext, EquipScroll can be set to equip/unequip items with different inputs.

The UseAbility is used to use an UsableItemAction. There can be multiple Use abilities. This can be for using items which have multiple ItemActions with different IDs.

You may have a ShootableAction for firing and a MeleeAction for hitting objects with the blunt of your pistol.
In some cases the input may need to change depending on the equipped item. In the demo scene the bow and dual pistols have different inputs. State presets are used to change the parameters of the ability, allowing different inputs, ItemSlots or ActionIDs to be used.