top of page

VR Inventory Box Component

This is an Inventory component which allows user to store items in it. Simply put in or grabbing items from it.

Class name:

Include:

Type:

Lines of code:

UVR_InventoryBox

#include "VR/VR_Components/VR_InventoryBox.h"

Interactable Component

465

​General Information

Description

This is a component which is inherited from UBoxComponent. Inventory component allows user to store items in it. Simply put in or grabbing items from it.



This is a component which is inherited from UBoxComponent. Inventory component allows user to store items in it. Simply put in or grabbing items from it.
VR Inventory Box Component Example. BP_Backpack.


Settigns


Invetory type - This is a enum variable which can be set to Invisible or Freezer type. Item will disappear If set to invisible. Item will be visible and attached if set to freezer. Destroy When In - If set to true item will be destroyed on put (Works only with Invisible Invetory type).  Size Type - This is a enum variable which can be set to single or multi.   Maximum Capacity - This is an integer variable which represents inventory max capacity (Only with Size Type set to multi).  Only Actors Of Class - This is a bool variable which allows only selected classes to be put in.   Only Actors Of Class Array - This is an array of selected classes to be put in(Only with Only Actors Of Class set to true).  Snap Item - This is a bool variable which allows items to be snapped to the specefied relative transform.  Snap Transforms - This is an array of snap transforms(Only with Snap Item set to true).  Snap Transform  - This is a snap transform(Only with Snap Item set to true).
VR Inventory Box settigns

Invetory type - This is a enum variable which can be set to Invisible or Freezer type. Item will disappear If set to invisible. Item will be visible and attached if set to freezer. Destroy When In - If set to true item will be destroyed on put (Works only with Invisible Invetory type).

Size Type - This is a enum variable which can be set to single or multi.

Maximum Capacity - This is an integer variable which represents inventory max capacity (Only with Size Type set to multi).

Only Actors Of Class - This is a bool variable which allows only selected classes to be put in.

Only Actors Of Class Array - This is an array of selected classes to be put in(Only with Only Actors Of Class set to true).

Snap Item - This is a bool variable which allows items to be snapped to the specefied relative transform.

Snap Transforms - This is an array of snap transforms(Only with Snap Item set to true).

Snap Transform  - This is a snap transform(Only with Snap Item set to true).


Blueprint API Reference

Public Member Functions


virtual void 

BeginPlay () override

 


FORCEINLINE AActor * 

 


FORCEINLINE int 

 


FORCEINLINE int 

GetStoredNum () const

 


FORCEINLINE EInventoryBoxType 

 


FORCEINLINE EInventorySizeTypes 

GetSizeType () const

 


FORCEINLINE bool 

 


FORCEINLINE TArray< AActor * > 

 


FORCEINLINE AActor * 

 


FORCEINLINE TArray< TSubclassOf< AActor > > 

 


FORCEINLINE TSubclassOf< AActor > 

GetActorClass () const

 


FORCEINLINE bool 

IsSomeThingIn () const

 


void 

OnOverlapBegin (class UPrimitiveComponent OverlappedComp, class AActor OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)

 

On camera GetCapsuleComponent() Overlap begin.

 


void 

OnOverlapEnd (class UPrimitiveComponent OverlappedComp, class AActor OtherActor, class UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)

 

On camera GetCapsuleComponent() Overlap end.

 


bool 

PutActorIn (AActor *Actor)

 


AActor * 

TakeActor (FVector TakeLocation)

 


bool 

ActorHasAccess (AActor *Actor)

 


bool 

 


Public Attributes


FComponentItemPut 

 


FComponentItemTake 

 


Protected Member Functions


 

UPROPERTY (EditAnywhere, BlueprintReadWrite, Category="Settings | Inventory", meta=(EditCondition="InventoryType == EInventoryBoxType::Freezer && bSnapItem == true && (SizeType == EInventorySizeTypes::Single)", EditConditionHides)) FTransform SnapTransform

 


Protected Attributes


 


 


int 

 


bool 

 


TArray< TSubclassOf< AActor > > 

 


bool 

 


bool 

 


TArray< FTransform > 

 


TArray< bool > 


bottom of page