YOM Replicator SDK 0.8.0.0
A metaverse SDK created by YOM
Loading...
Searching...
No Matches
UYomInventoryComponent Class Reference

Detailed Description

The Inventory YomModule, which keeps track of the items the player has in his wallet.

Inheritance diagram for UYomInventoryComponent:
UYomModule

Public Member Functions

Blueprint Functions
void SpawnItem (int pIndex)
 Spawns an item at a given index in the YomInventoryItems array. More...
 
void DespawnAllItems ()
 Despawns all of the placed items of the player. More...
 
void AddItem (AYomInventoryItem *pItem)
 Adds item to the wallet of the player. More...
 
const TArray< AYomInventoryItem * > & GetYomInventoryItems ()
 Returns the wallet items in the player wallet. More...
 
TArray< AYomInventoryItem * > GetSpawnedYomInventoryItems ()
 Returns the wallet items that have been spawned in the game. More...
 
AYomInventoryItemGetItemByID (const FString &pID)
 Retrieves an item of the player by ID. More...
 
TArray< AYomInventoryItem * > GetItemsByMasterID (const FString &pMasterID)
 

Public Attributes

Blueprint Members
TSubclassOf< UYomPlayerInventoryWidgetInventoryWidget
 The class of the inventory widget that is displayed on the client side. More...
 
UYomPlayerInventoryWidgetWidget
 Instance of the inventory widget that is displayed on the client side. More...
 
FOnInvetoryFetched OnInventoryFetched
 Called when the items of the player are fetched on the server. More...
 
TArray< FKey > OpenInventoryKeys = { EKeys::I }
 Key that should be pressed to open the inventory. More...
 
TArray< FKey > RemoveAllItemsKeys = { EKeys::G }
 Key that should be pressed to remove all items from the space. More...
 

Member Function Documentation

◆ AddItem()

void UYomInventoryComponent::AddItem ( AYomInventoryItem pItem)

Adds item to the wallet of the player.

Parameters
pItemThe item that needs to be added

◆ DespawnAllItems()

void UYomInventoryComponent::DespawnAllItems ( )

Despawns all of the placed items of the player.

◆ GetItemByID()

AYomInventoryItem * UYomInventoryComponent::GetItemByID ( const FString &  pID)

Retrieves an item of the player by ID.

Parameters
pIDThe id of the item
Returns
The item that was searched for or null if it was not found

◆ GetItemsByMasterID()

TArray< AYomInventoryItem * > UYomInventoryComponent::GetItemsByMasterID ( const FString &  pMasterID)

◆ GetSpawnedYomInventoryItems()

TArray< AYomInventoryItem * > UYomInventoryComponent::GetSpawnedYomInventoryItems ( )

Returns the wallet items that have been spawned in the game.

◆ GetYomInventoryItems()

const TArray< AYomInventoryItem * > & UYomInventoryComponent::GetYomInventoryItems ( )

Returns the wallet items in the player wallet.

◆ SpawnItem()

void UYomInventoryComponent::SpawnItem ( int  pIndex)

Spawns an item at a given index in the YomInventoryItems array.

Parameters
pIndexThe index of the YomInventoryItems array

Member Data Documentation

◆ InventoryWidget

TSubclassOf<UYomPlayerInventoryWidget> UYomInventoryComponent::InventoryWidget

The class of the inventory widget that is displayed on the client side.

◆ OnInventoryFetched

FOnInvetoryFetched UYomInventoryComponent::OnInventoryFetched

Called when the items of the player are fetched on the server.

◆ OpenInventoryKeys

TArray<FKey> UYomInventoryComponent::OpenInventoryKeys = { EKeys::I }

Key that should be pressed to open the inventory.

◆ RemoveAllItemsKeys

TArray<FKey> UYomInventoryComponent::RemoveAllItemsKeys = { EKeys::G }

Key that should be pressed to remove all items from the space.

◆ Widget

UYomPlayerInventoryWidget* UYomInventoryComponent::Widget

Instance of the inventory widget that is displayed on the client side.