Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

4. Usage

Lucas Vilas-Bôas edited this page Apr 18, 2023 · 1 revision

Inventory Component

Inventory Components are the inventory itself. This component is responsible to store and manage the inventory package.

Adding the component

This component derives from UActorComponent and the addition is the same as described by Unreal Engine: https://docs.unrealengine.com/5.1/en-US/components-in-unreal-engine/

Adding Items

To add items, you'll have some options:

  • Using functions such as AddItems
  • Manually adding via Editor
    image

Inventory Package Actor

Util actor already containing some useful functions and the inventory component.

Creating the Actor

This actor derives from AActor and the creation is the same as described by Unreal Engine: https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/

Adding Items

To add items, you'll have some options:

  • Using functions such as AddItems
  • Manually adding via Editor
    image

Debugging

Logging

  • You can enable internal logs via: Project Settings -> Plugins -> Elementus Inventory -> Enable Internal Logs

Status & Consumption

  • Inventory Components also contains a function to assist debugging and monitor the consumption: DebugInventory