Section 2.11. rdInstBase – Utilities

// [rdInst v1.35] Helper Function that Sets the Label (Editor only) of the Actor
void rdSetActorLabel(AActor* actor,const FName label);

// [rdInst v1.22] Returns the number of assets compiling or waiting for compile
int32 rdGetNumAssetsCompiling();

// [rdInst v1.22] waits for all assets to finish compiling
void rdWaitForCompiling();

// [rdInst v1.22] Submits all materials for compile
void rdSubmitMaterialsForCompile();

// [rdInst v1.35] Is Editor
bool rdIsEditor();

// [rdInst v1.36] Is Playing
bool rdIsPlaying();

// [rdInst v1.43] Fills the Location and Rotation vectors with the editors current camera position
void rdGetEditorCameraPos(FVector& loc,FRotator& rot);

// [rdInst v1.43] Returns the currently controlled Pawn. If this returns null, it means a multiplayer pawn is waiting to spawn
APawn* rdGetControlledPawn();

// [rdInst v1.43] Draws a line from start to end in col for duration
void rdDrawLine(const FVector& start,const FVector& end,const FColor& col,float duration=10000.0f);

// [rdInst v1.35] Get Landscape Bounds
FBox rdGetLandscapeBounds(ALandscapeProxy* landscape);

// [rdInst v1.22] Get Current average Scalabity (0-4)
rdScalabilityScale rdGetCurrentScalability();

// [rdInst v1.22] Get Current Scalabity for specified area (0-4)
rdScalabilityScale rdGetCurrentScalabilityFor(rdScalabilityType stype);

// [rdInst v1.22] Get Current Resolution Scale (0-100)
float rdResolutionScale();

// [rdInst v1.22] Get Scalability Benchmark Results for CPU and GPU
bool rdGetScalabilityBenchmarks(float& bmCpu,float& bmGpu);

// [rdInst v1.35] Adds SpawnStuffData with the baked transforms of the volume to the proxy scan list, useful for turning off collision and using a proxy collision when close
int32 rdBakeVolumeTransformsForProxies(AActor* volume,const TArray<UStaticMesh*>& meshes,const TArray<FrdProxySetup>& proxies,TArray<FrdSpawnStuffData>& bakedObjectList,int32 rows=1,int32 cols=1,bool storeTransforms=false);

// [rdInst v1.35] Removes the SpawnStuffData associated with this volume from the proxy scan list
void rdRemoveVolumeTransformsForProxies(AActor* volume);

// [rdInst v1.35] Creates a SpawnStuffActor from the passed in instances
AActor* rdCreateSpawnActorFromObjectList(UrdSetObjectsList* instances,const FTransform& transform,double distance=0.0f,int32 distFrames=0,bool spatial=true);

// [rdInst v1.35] Traces through the SpawnStuff Baked data to find overlaps
void rdSphereTraceSpawnStuffData(const FrdSpawnStuffData& sdat,const FVector location,float radius,TArray<AActor*>& actors,TArray<FrdInstanceItems>& instances,TArray<AActor*>& ignoreActors);