RapyutaSimulationPlugins
Public Member Functions | Public Attributes | List of all members
FRRResourceInfo Struct Reference

Structure to store resources(Uassets) information. More...

#include <RRObjectCommon.h>

Public Member Functions

 FRRResourceInfo ()
 Construct a new FRRResourceInfo. More...
 
 FRRResourceInfo (const ERRResourceDataType InDataType)
 Construct a new FRRResourceInfo. More...
 
void AddResource (const FString &InUniqueName, const FSoftObjectPath &InAssetPath, UObject *InAssetData)
 
void Finalize ()
 Finalize object by using UBodySetup::ClearPhysicsMeshes and MarkAsGarbage. More...
 

Public Attributes

ERRResourceDataType DataType = ERRResourceDataType::NONE
 
int32 ToBeAsyncLoadedResourceNum = 0
 
bool bHasBeenAllLoaded = false
 
TMap< FString, FRRResourceData
 

Detailed Description

Structure to store resources(Uassets) information.

#RRGameSingleton has TMap of this to store info for each ERRResourceDataType

Data is TMap of FRRResource which has pointer to AssetData.

USTRUCT()

Constructor & Destructor Documentation

◆ FRRResourceInfo() [1/2]

FRRResourceInfo::FRRResourceInfo ( )
inline

Construct a new FRRResourceInfo.

◆ FRRResourceInfo() [2/2]

FRRResourceInfo::FRRResourceInfo ( const ERRResourceDataType  InDataType)
inline

Construct a new FRRResourceInfo.

Parameters
InDataType

Member Function Documentation

◆ AddResource()

void FRRResourceInfo::AddResource ( const FString &  InUniqueName,
const FSoftObjectPath &  InAssetPath,
UObject *  InAssetData 
)
inline

◆ Finalize()

void FRRResourceInfo::Finalize ( )
inline

Finalize object by using UBodySetup::ClearPhysicsMeshes and MarkAsGarbage.

BodySetup's collision mesh data are manually created from the underlying Physics engine, thus needs manual flush.

Besides, body setup data is shared among proc mesh comps, thus could not be destroyed in a dtor or OnComponentDestroyed()

See also
UBodySetup::ClearPhysicsMeshes
MarkAsGarbage

Member Data Documentation

◆ bHasBeenAllLoaded

bool FRRResourceInfo::bHasBeenAllLoaded = false

◆ Data

TMap<FString, FRRResource> FRRResourceInfo::Data

◆ DataType

ERRResourceDataType FRRResourceInfo::DataType = ERRResourceDataType::NONE

◆ ToBeAsyncLoadedResourceNum

int32 FRRResourceInfo::ToBeAsyncLoadedResourceNum = 0

The documentation for this struct was generated from the following file: