Section 3. rdActor
Section 3.1. rdActor – Event Handlers
// [rdInst v1.00] The OnConstruction Script has code to generate a new Random Seed if this Actors bRandomStart flag is True
virtual void OnConstruction(const FTransform &Transform) override;
// [rdInst v1.00] Used Internally to Destroy ISMs associated with this Actor
virtual void BeginDestroy() override;
virtual void Destroyed() override;
// [rdInst v1.00] The BeginPlay event, has code to generate a new Random Seed if this Actors bRandomStart flag is True
virtual void BeginPlay() override;
// [rdInst v1.00] The EndPlay event, has code to remove instances - this gets called when actors are unloaded with WorldPartition
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
// [rdInst v1.24] Called when Actor falls out of world - usually destroys the actor
virtual void FellOutOfWorld(const UDamageType& dmgType) override;
// [rdInst v1.35] Called when the Actors lifetime expires
virtual void LifeSpanExpired() override;
// [rdInst v1.24] Implement this Event to handle removing things when actor is destroyed. Works in the editor
void rdDestroyed();
#if WITH_EDITOR
// [rdInst v1.00] Refreshes the rdActor after a drag operation
virtual void PostEditMove(bool bFinished);
#endif
Section 3.2. rdActor – Build

// [rdInst v1.00] Changes the Seed used for the Random Generation and rebuilds the Actor
void rdRandomize();
// [rdInst v1.00] Applies the Randomizations on this and its Children and creates the ISMs
void rdBuild();
// [rdInst v1.00] Queues this actor to be built next tick
void rdDirty(int32 countdown=0);
// [rdInst v1.10] Event called when in Build Mode, just fires the rdBuild Event where you can process your actors in the Blueprint
void rdBuildEvent();
// [rdInst v1.00] Enumerates the folder, building the children if they're rdActors
void rdBuildFolder(USceneComponent* comp);
// [rdInst v1.00] Goes through all the Child Components of this Actor applying their Randomization Settings
void rdBuildRandomizedComponents();
// [rdInst v1.00] Builds the Instanced Static Meshes for this Actor with their Randomizations
void rdBuildRandomizedISMs();
// [rdInst v1.00] Like rdBuildRandomizedISMs, but it resets the rdInst BaseActor as well
void rdRecreateBPInstances();
// [rdInst v1.00] Builds the Instanced Static meshes from our InstanceList, ignoring Hidden Folders. No Randomization is applied
void rdBuildShowOnlyOneISMs_Folder();
// [rdInst v1.00] Usually called internally, this hides all but one Actor or Folder of Actors contained as children of this Actor
void rdThereCanBeOnlyOne();
Section 3.3. rdActor – Randomization

// [rdInst v1.00] Adds the Randomization from the RandomSettings to the Transform. If this Actor is reliant on another Actor that has not been processed yet, processed is set to false
bool rdAddRandomization(FTransform& outTransform,FrdRandomSettings* rnd,bool& processed);
// [rdInst v1.00] Utility Node that returns a Random Vector between the two passed in Vector limits
FVector rdRandomVectorInRange(const FVector& v1,const FVector& v2);
// [rdInst v1.00] Utility Node that returns a Random Rotator between the two passed in rotation limits, and the Flip Probability Vector
FRotator rdRandomRotatorInRange(const FRotator& r1,const FRotator& r2,const FVector& flipProb);
Section 3.4. rdActor – Themes

// [rdInst v1.00] Returns the Current Theme, if this Actor has Parents, the Eldest Parents Theme is returned
FString rdGetTheme();
// [rdInst v1.00] Tests to see if the passed in Component is included with the current theme. If there is no theme, this returns True
bool rdFolderIncludedWithCurrentTheme(USceneComponent* comp);
// [rdInst v1.00] Tests to see if the passed in folder name is included with the current theme. If there is no theme, this returns True
bool rdFolderFromNameIncludedWithCurrentTheme(const FString& folder);
Section 3.5. rdActor – Visibility

// [rdInst v1.00] Shows or Hides the Actor along with all its components and instances
void rdSetActorVisibility(bool vis);
// [rdInst v1.35] Shows or Hides the Instance
void rdSetInstanceVisibility(UStaticMesh* mesh,int32 index,bool vis);
// [rdInst v1.35] Shows or Hides the Instance (with ISMC reference)
void rdSetInstanceVisibilityFast(UInstancedStaticMeshComponent* ismc,int32 index,bool vis);
// Shows or Hides the Array of Instances (with ISMC reference)
void rdSetInstancesVisibility(UStaticMesh* mesh,const TArray<int32>& indexes,bool vis);
// Shows or Hides the Array of Instances
void rdSetInstancesVisibilityFast(UInstancedStaticMeshComponent* ismc,const TArray<int32>& indexes,bool vis);
// [rdInst v1.00] Shows or Hides the Folder of Actors
void rdSetFolderVisibility(USceneComponent* comp,const FString& folder,bool vis);
// [rdInst v1.00] Shows or Hides the Folder of Actors (just from name)
void rdSetFolderNameVisibility(const FString& folder,bool vis);
// [rdInst v1.00] Hides all Children and ISMs of this Actor
void rdHideAllChildren();
Section 3.6. rdActor – Instancing
The rdActor Instancing routines call the rdInstBaseActor functions. The BaseActor is a singleton that stores one ISM or HISM component for each mesh rather than having each actor store them, a much more efficient way of rendering.
These Instance methods are broken into the following categories:
Section 3.6.1. rdActor – Instancing – Adding

// [rdInst v1.00] Adds an Instance to the scene of the StaticMesh.
int32 rdAddInstance(UStaticMesh* mesh,const FTransform& transform);
// [rdInst v1.00] Adds an Instance to the scene of the StaticMesh in WorldSpace.
int32 rdAddInstanceWorld(UStaticMesh* mesh,const FTransform& transform);
// [rdInst v1.00] Adds an Instance of the StaticMesh from the passed ISMC to the level using the passed in Transform
int32 rdAddInstanceFast(UInstancedStaticMeshComponent* instGen,const FTransform& transform);
// [rdInst v1.00] Adds an Instance of the StaticMesh from the passed HISMC to the level using the passed in Transform
int32 rdAddInstanceFastWorld(UInstancedStaticMeshComponent* instGen,const FTransform& transform);
// [rdInst v1.20] Adds to the InstanceData for this Actor from the passed in Array of Transforms for the specified StaticMesh
bool rdAddInstances(UStaticMesh* mesh,const TArray<FTransform>& transforms);
// [rdInst v1.20] Adds Instances for the passed in Array of Transforms for the specified StaticMesh
int32 rdAddInstancesFast(UStaticMesh* mesh,const TArray<FTransform>& transforms);
// [rdInst v1.22] Adds a new Instance of the StaticMesh to our Actors Instance List
void rdAddInstanceToList(UStaticMesh* mesh,const FTransform& transform);
// [rdInst v1.22] Adds a new Instance of the StaticMesh to our Actors Instance List with the passed in folder and Component to get Randomization from
void rdAddAdvInstanceToList(UStaticMesh* mesh,const FTransform& transform,const FString& folder,UActorComponent* comp);
// [rdInst v1.00] Adds a new Instance of the StaticMesh to our Actors Instance List with the passed in Randomized properties
void rdAddInstanceLong(UStaticMesh* mesh,UChildActorComponent* comp,const FTransform& transform,const FString& name,const FString& folder);
Section 3.6.2. rdActor – Instancing – Removing

// [rdInst v1.00] Removes the Instance referred to by index for the specified StaticMesh
void rdRemoveInstance(UStaticMesh* mesh,int32 index);
// [rdInst v1.00] Removes the Instance referred to by index in the HISMC
void rdRemoveInstanceFast(UInstancedStaticMeshComponent* instGen,int32 index);
// [rdInst v1.00] Removes all the StaticMesh Instances in our Actors Instance List
void rdClearInstanceList();
// [rdInst v1.00] Removes all Instanced Static Meshes associated with this Actor
void rdRemoveInstances();
// [rdInst v1.00] Removes all Instanced Static Meshes on all actors
void rdResetAllInstances();
Section 3.6.3. rdActor – Instancing – Transforming

// [rdInst v1.00] Sets the Specified Instance of the UStaticMeshes FTransform
void rdSetInstanceTransform(UStaticMesh* mesh,int32 index,const FTransform& transform);
// [rdInst v1.00] Gets the Transform of the Specified Instance of the UStaticMesh
bool rdGetInstanceTransform(UStaticMesh* mesh,int32 index,FTransform& transform);
// [rdInst v1.00] Adds to the Specified Instances Transform with the specified FTransform
void rdAddInstanceTransform(UStaticMesh* mesh,int32 index,const FTransform& transform);
// [rdInst v1.00] Updates this Actors Instances to reflect the Actors new Transform
void rdUpdateISMTransforms();
// [rdInst v1.00] Returns the World Transform of the specified Relative Transform
FTransform rdInstToWorld(const FTransform& tran);
// Returns the Relative Transform of the specified World Transform
FTransform rdWorldToInst(const FTransform& tran);
// [rdInst v1.00] Update the Transform for the specified Instance Index
void rdUpdateTransform(UStaticMesh* mesh,int32 index,const FTransform& transform);
// [rdInst v1.00] Update the Transforms for the specified Instance Indexes
void rdUpdateTransforms(UStaticMesh* mesh,int32 startIndex,const TArray<FTransform>& transforms);
// [rdInst v1.36] rdUpdateInstanceTransformsFromList
void rdUpdateInstanceTransformsFromList(const FrdInstancesMap& selISMCmap);
// [rdInst v1.35] Increment the Transforms for the specified Instance Indexes
void rdIncrementTransforms(UStaticMesh* mesh,const TArray<int32>& indexes,const FTransform& transform);
// [rdInst v1.10] Gets a reference to the Per-Instance Transforms for the mesh
TArray<FTransform>& rdGetTransformsPtr(UStaticMesh* mesh,int32& numTransforms);
// [rdInst v1.10] Get the Transform of the FastInstance item
FTransform rdGetFastArrayItemTransform(int32 index,int32 tindex);
// [rdInst v1.10] Set the Transform of the FastInstance item
void rdSetFastArrayItemTransform(int32 index,int32 tindex,const FTransform transform);
// [rdInst v1.10] Gets the Transform of the RandomizedInstance item
FTransform rdGetRandomizedArrayItemTransform(int32 index,int32 tindex);
// [rdInst v1.10] Set the Transform of the RandomizedInstance item
void rdSetRandomizedArrayItemTransform(int32 index,int32 tindex,const FTransform transform);
Section 3.6.4. rdActor – Per-Instance Custom Data


// [rdInst v1.50] Sets the Number of CustomData per Instance
void rdSetNumInstCustomData(UStaticMesh* mesh,int32 numData);
// [rdInst v1.50] Sets the Number of CustomData per Instance
void rdSetNumInstCustomDataX(const FName sid,int32 numData);
// [rdInst v1.36] Sets the PerInstance CustomData Value for all instances used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataValueForMesh(const UStaticMesh* mesh,int32 index,float data);
// [rdInst v1.50] Sets the PerInstance CustomData Value for all instances used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataValueForMeshX(const FName sid,int32 index,float data);
// [rdInst v1.36] Sets the PerInstance CustomData Values for all instances used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataForMesh(const UStaticMesh* mesh,TArray<float> data);
// [rdInst v1.50] Sets the PerInstance CustomData Values for all instances used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataForMeshX(const FName sid,TArray<float> data);
// [rdInst v1.36] Sets the PerInstance CustomData Value for all instances with ID (first custom float) used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataValueForMeshID(const UStaticMesh* mesh,float ID,int32 index,float data);
// [rdInst v1.50] Sets the PerInstance CustomData Value for all instances with ID (first custom float) used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataValueForMeshIDX(const FName sid,float ID,int32 index,float data);
// [rdInst v1.36] Sets the PerInstance CustomData Values for instances with the ID (first custom float) used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataForMeshID(const UStaticMesh* mesh,float ID,TArray<float> data);
// [rdInst v1.50] Sets the PerInstance CustomData Values for instances with the ID (first custom float) used by this Actor
UPARAM(DisplayName="ErrorCode") int32 rdSetPerInstanceDataForMeshIDX(const FName sid,float ID,TArray<float> data);
// [rdInst v1.24] Gets a reference to the Per-Instance CustomData for the mesh
TArray<float>& rdGetCustomDataPtr(UStaticMesh* mesh,int32& numData);
// [rdInst v1.50] Gets a reference to the Per-Instance CustomData for the mesh
UPARAM(DisplayName="CustomFloats") TArray<float>& rdGetCustomDataPtrX(const FName sid,int32& numData);
// [rdInst v1.50] Gets a reference to the Per-Instance CustomData for the mesh
UPARAM(DisplayName="CustomFloats") TArray<float>& rdGetCustomDataPtrFast(UInstancedStaticMeshComponent* mesh,int32& numData);
// [rdInst v1.50] Gets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol3Data(UStaticMesh* mesh,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.50] Gets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol3DataX(const FName sid,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.50] Gets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol3DataFast(UInstancedStaticMeshComponent* ismc,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.50] Gets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol4Data(UStaticMesh* mesh,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.50] Gets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol4DataX(const FName sid,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.50] Gets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
FLinearColor rdGetCustomCol4DataFast(UInstancedStaticMeshComponent* ismc,int32 instanceIndex,int32 dataIndex);
// [rdInst v1.24] Sets a value to the Per-Instance CustomData for the mesh
void rdSetCustomData(UStaticMesh* mesh,int32 instanceIndex,int32 dataIndex,float value);
// [rdInst v1.50] Sets a value to the Per-Instance CustomData for the mesh
void rdSetCustomDataX(const FName sid,int32 instanceIndex,int32 dataIndex,float value,bool batch=false);
// [rdInst v1.50] Sets a value to the Per-Instance CustomData for the mesh
void rdSetCustomDataFast(UInstancedStaticMeshComponent* ismc,int32 instanceIndex,int32 dataIndex,float value,bool batch=false);
// [rdInst v1.50] Sets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol3Data(UStaticMesh* mesh,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol3DataX(const FName sid,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets an RGB Linear Color (3 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol3DataFast(UInstancedStaticMeshComponent* ismc,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol4Data(UStaticMesh* mesh,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol4DataX(const FName sid,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets an RGBA Linear Color (4 floats) to the Per-Instance CustomData for the mesh
void rdSetCustomCol4DataFast(UInstancedStaticMeshComponent* ismc,int32 instanceIndex,int32 dataIndex,const FLinearColor& col,bool batch=false);
// [rdInst v1.50] Sets all the values to the Per-Instance CustomData array for the mesh
void rdSetAllCustomData(UStaticMesh* mesh,UPARAM(ref) TArray<float>& data,bool update=true);
// [rdInst v1.50] Sets all the values to the Per-Instance CustomData array for the mesh
void rdSetAllCustomDataX(const FName sid,UPARAM(ref) TArray<float>& data,bool update=true);
// [rdInst v1.50] Sets all the values to the Per-Instance CustomData array for the ISMC
void rdSetAllCustomDataFast(UInstancedStaticMeshComponent* ismc,UPARAM(ref) TArray<float>& data,bool update=true);
// [rdInst v1.24] Updates the Per-Instance CustomData for the mesh
void rdUpdateCustomData(UStaticMesh* mesh);
// [rdInst v1.50] Updates the Per-Instance CustomData for the mesh
void rdUpdateCustomDataX(const FName sid);
// [rdInst v1.50] Updates the Per-Instance CustomData for the ISMC
void rdUpdateCustomDataFast(UInstancedStaticMeshComponent* ismc);
Section 3.6.5. rdActor – Instancing – Sid Utilities

// [rdInst v1.50] Returns the Instance Handle ID for the specified StaticMesh
FName rdGetSMsid(const UStaticMesh* m,TEnumAsByte<ErdSpawnType> type=ErdSpawnType::UseDefaultSpawn,int32 id=0,const FName groupName=NAME_None);
// [rdInst v1.50] Returns the Instance Handle ID for the specified StaticMesh, Material list and optional scale for negative checks
FName rdGetSMXsid(TEnumAsByte<ErdSpawnType> type,const UStaticMesh* m,TArray<TSoftObjectPtr<UMaterialInterface>> mats,bool bReverseCulling=false,ErdCollision collision=ErdCollision::UseDefault,float startCull=-1.0f,float endCull=-1.0f,int32 id=0,const FName groupName=NAME_None);
// [rdInst v1.50] Returns the Instance Handle ID for the specified StaticMesh Component, using it's materials and negative scale flags
FName rdGetSMCsid(const UStaticMeshComponent* smc,TEnumAsByte<ErdSpawnType> type=ErdSpawnType::UseDefaultSpawn,float overrideStartCull=-1.0f,float overrideEndCull=-1.0f,int32 overrideID=0,const FName overrideGroupName=NAME_None);
// [rdInst v1.50] Returns the StaticMesh referenced by the sid
UStaticMesh* rdGetMeshFromSid(const FName sid);
// [rdInst v1.50] Returns a SoftObjectPtr to the StaticMesh referenced by the sid
TSoftObjectPtr<UStaticMesh> rdGetSoftMeshFromSid(const FName sid);
// [rdInst v1.50] Returns the StaticMesh referenced by the sid
TArray<TSoftObjectPtr<UMaterialInterface>> rdGetMaterialsFromSid(const FName sid);
// [rdInst v1.50] Returns the Name of the StaticMesh referenced by the sid
FString rdGetMeshNameFromSid(const FName sid);
Section 3.6.6. rdActor – Instancing – Utilities


// [rdInst v1.24] Returns the InstancedStaticMeshComponent for the StaticMesh
UInstancedStaticMeshComponent* rdGetInstanceGen(UStaticMesh* mesh,bool create=true);
// [rdInst v1.50] Returns the InstancedStaticMeshComponent for the StaticMesh
UInstancedStaticMeshComponent* rdGetInstanceGenX(const FName sid,bool create=true);
// [rdInst v1.00] Returns the HierarchicalInstancedStaticMeshComponent for the StaticMesh
UHierarchicalInstancedStaticMeshComponent* rdGetHInstanceGen(UStaticMesh* mesh,bool create=true);
// [rdInst v1.50] Returns the HierarchicalInstancedStaticMeshComponent for the StaticMesh
UHierarchicalInstancedStaticMeshComponent* rdGetHInstanceGenX(const FName sid,bool create=true);
// [rdInst v1.50] Finds and returns the UInstancedStaticMeshComponent assigned to the StaticMesh
UInstancedStaticMeshComponent* rdGetPreferredInstanceGenX(const FName sid,bool create=true);
// [rdInst v1.00] Returns the StaticMesh belonging to the HISMC or a nullptr if the passed in component is not a HISMC
UStaticMesh* rdGetStaticMeshFromInstanceIndex(UPrimitiveComponent* comp);
// [rdInst v1.00] Returns the rdActor that owns the Instance or a nullptr if the passed in component is not a HISMC or index not valid
ArdActor* rdGetrdActorFromInstanceIndex(UPrimitiveComponent* comp,int32 index);
// [rdInst v1.26] Returns all the instance indexes for the Mesh, used by this actor
UPARAM(DisplayName="NumIndexes") int32 rdGetInstanceIndexesForMesh(const UStaticMesh* mesh,TArray<int32>& indexes);
// [rdInst v1.50] Returns all the instance indexes for the Mesh, used by this actor
UPARAM(DisplayName="NumIndexes") int32 rdGetInstanceIndexesForMeshX(const FName sid,TArray<int32>& indexes);
// [rdInst v1.00] Builds the InstanceData for this Actor from the passed in Arrays (must be the same length)
bool rdSetInstanceData(const TArray<UStaticMesh*>& meshList,const TArray<FTransform>& transforms);
// [rdInst v1.50] Builds the InstanceData for this Actor from the passed in Arrays (must be the same length)
bool rdSetInstanceDataX(const TArray<FName>& sidList,const TArray<FTransform>& transforms);
// [rdInst v1.00] Returns the last Instance Index created for the StaticMesh, returns -1 if there are none
int32 rdGetLastInstanceIndex(UStaticMesh* mesh);
// [rdInst v1.50] Returns the last Instance Index created for the StaticMesh, returns -1 if there are none
int32 rdGetLastInstanceIndexX(const FName sid);
// [rdInst v1.00] Gets the Bounds of all the instances in this blueprint
void rdGetInstancesBounds(const FVector& inMin,const FVector& inMax,FVector& outMin,FVector& outMax);
// [rdInst v1.24] Mirror the instances in this blueprint
void rdMirrorInstanceLocations(int32 axis,const FVector& center);
// [rdInst v1.24] Place the instances in this blueprint on the ground
void rdPlaceOnGround(bool smartPlacement);
// [rdInst v1.30] Assimilate all StaticMesh Instances from the specified rdActor
void rdAssimilateChildInstances(ArdActor* rdActor,bool justVisible,bool recurse);
// [rdInst v1.30] (C++ wrappers)
void rdAssimilate(ArdActor* rdActorParent,bool justVisible);
void rdAssimilateRecurse(ArdActor* rdActorParent,bool justVisible);
// [rdInst v1.42] Sets or Clears Instance Edit Mode
void rdSetInstanceEditMode(bool editMode);
// [rdInst v1.42] Gets the current status this rdActors Instance Edit Mode
bool rdIsEditInstanceMode();
// [rdInst v1.50] Updates the Instance transforms in this actor to that of the src
bool rdUpdatePrefabBP(const AActor* src);
// [rdInst v1.50] Updates the Instance transforms in this actor to that of the src
bool rdUpdatePrefabWithActorList(AActor* src,TArray<FrdInstItemX> meshList,TArray<FrdActorItemX> list,bool updateTransforms=true);
Section 3.7. rdActor – Spawning

// [rdInst v1.00] Helper Function that Spawns an actor - this can be called from the ConstructionScript (just call rdDestroyAttachedActors() first)
AActor* rdSpawnActor(TSubclassOf<class AActor> actorClass,const FTransform& transform,const FName label=TEXT(""),AActor* parent=nullptr);
// [rdInst v1.10] Helper Function that Spawns an actor, with extra Position information - this can be called from the ConstructionScript (just call rdDestroyAttachedActors() first)
AActor* rdSpawnActorPos(TSubclassOf<class AActor> actorClass,const FTransform& transform,const FrdPositionInfo& pos,const FName label=TEXT(""));
// [rdInst v1.00] Helper Function that adds a Component
UActorComponent* rdAddComponent(TSubclassOf<class UActorComponent> compClass);
// [rdInst v1.00] Helper Function that adds a ChildActorComponent
UChildActorComponent* rdAddChildComponent(UClass* actorClass,const FTransform& transform);
// [rdInst v1.10] Helper Function that adds a ChildActorComponent, with extra Position information
UChildActorComponent* rdAddChildComponentPos(UClass* actorClass,const FTransform& transform,const FrdPositionInfo& pos);
// [rdInst v1.00] Destroys all Actors that have been Spawned with the rdSpawnActor Node
void rdDestroyAttachedActors();
// [rdInst v1.00] Destroys all ChildComponents that have been added with the rdAddChildComponent Node
void rdDestroyAttachedComponents();
Section 3.8. rdActor – Pooling


// [rdInst v1.10] Allocates "numToPool" number of the componentClass for rapid reuse
void rdPoolComponent(UClass* compClass,int32 numToPool,bool premake=true,bool doTick=false,bool startHidden=false,bool reuse=false,bool simplePool=false,int32 growBy=0);
// [rdInst v1.10] ReAllocates "numToPool" number of the compClass
bool rdSetComponentPoolSize(UClass* compClass,int32 numToPool,bool premake=true,bool doTick=false,bool startHidden=false,bool reuse=false,bool simplePool=false,int32 growBy=0);
// [rdInst v1.10] Removes the Pool of Components for the compClass
void rdRemoveComponentPool(UClass* compClass);
// [rdInst v1.10] Gets the next free compClass in the Component Pool, returns nullptr if none are free
UActorComponent* rdGetComponentFromPool(TSubclassOf<class UActorComponent> compClass);
// [rdInst v1.10] Removes an allocated Component from the Component Pool
void rdRemoveComponentFromPool(UActorComponent* comp);
// [rdInst v1.35] Event called when an actor is created from the pool
void rdOnActorPooled(AActor* actor);
// [rdInst v1.35] Event called when an actor is removed back to the pool
void rdOnActorDepooled(AActor* actor);
// [rdInst v1.20] Event called when a component is created from the pool
void rdOnCompPooled(AActor* actor,UActorComponent* comp);
// [rdInst v1.20] Event called when a component is removed back to the pool
void rdOnCompDepooled(AActor* actor,UActorComponent* comp);
// [rdInst v1.50] Returns the amount of Pooled Components for this Class
int32 rdGetComponentPoolSize(TSubclassOf<class UActorComponent> compClass);
// [rdInst v1.50] Grows the amount of Pooled Components for this Class by the specified amount
int32 rdGrowComponentPool(TSubclassOf<class UActorComponent> compClass,int32 growAmount);
Section 3.9. rdActor – Conversions

// [rdInst v1.10] Converts the Instance to a ChildActorComponent
UChildActorComponent* rdConvertInstanceToChildActor(UStaticMesh* mesh,int32 index);
// [rdInst v1.10] Converts the Instance to a new StaticMesh Actor in the level, setting its mesh to the instance mesh (spawn)
AActor* rdConvertInstanceToLevelActor(UStaticMesh* mesh,int32 index);
// [rdInst v1.10] Converts the Instance to a new Actor - actorClass, in the level (spawn)
AActor* rdConvertInstanceToActor(UStaticMesh* mesh,UClass* actorClass,int32 index);
// [rdInst v1.10] Converts the Instance to a new Actor in the level from the ActorPool
AActor* rdConvertInstanceToActorFromPool(UStaticMesh* mesh,UClass* actorClass,int32 index);
// [rdInst v1.10] Helper Function that Converts all the Instances into Actors in the level
void rdConvertInstancesToActors(bool stripFolders,bool useRandom,bool group,const FTransform& destTransform,const FVector& centerLocation,const FString& baseFolder,TArray<AActor*>& addedActors);
// [rdInst v1.20] Helper Function that Returns Arrays of all Instances in this actor
void rdHarvestInstances(bool incRandom,TArray<UStaticMesh*>& meshList,TArray<FTransform>& transformList,TArray<FString>& nameList,TArray<FString>& folderList);
// [rdInst v1.35] Converts all ISMs and HISMs to StaticMeshComponents
void rdConvertISMsToSMs();
// [rdInst v1.35] Converts all StaticMeshComponents to instances
void rdConvertSMsToISMs();
Section 3.10. rdActor – Assimilation

// [rdInst v1.10] Assimilate all StaticMesh Instances from the specified rdActor
void rdAssimilateChildInstances(ArdActor* rdActor,bool justVisible,bool recurse);
void rdAssimilate(ArdActor* rdActorParent,bool justVisible);
void rdAssimilateRecurse(ArdActor* rdActorParent,bool justVisible);
Section 3.11. rdActor – Utilities


// [rdInst v1.50] Always returns true
bool rdIsRdActor() { return true; }
// [rdInst v1.50] Always returns true
bool rdIsRdPrefab() { return true; }
// [rdInst v1.50] Clears the List of Alterations
virtual void rdClearAlteredList();
// [rdInst v1.50] Builds a List of Alterations of the rdActors Instance data (each remove and change function stores the alterations)
virtual FString rdBuildAlteredList();
// [rdInst v1.50] Applies the List of Alterations to the rdActors Instance data
virtual int32 rdApplyAlteredList(const FString& str);
// [rdInst v1.50] Moves the Instance Array Data to the Fast Tables
void rdMoveArraysToTables();
// [rdInst v1.50] Moves the Instance Fast Tables Data to the Arrays
void rdMoveTablesToArrays();
// [rdInst v1.10] Call regularly to maintain profile information
void rdGetFunctionCycles();
// [rdInst v1.10] Implement this Function with your Blueprint code you want to profile
void rdFunctionCyclesFunction();
// [rdInst v1.35] Adds a StaticMesh Component to the actor
UStaticMeshComponent* rdAddStaticMesh(UStaticMesh* mesh,const FTransform& transform,const FString& label=FString(""));
// [rdInst v1.50] Adds a StaticMesh Component to the actor
UStaticMeshComponent* rdAddStaticMeshX(const FName sid,const FTransform& transform,const FString& label=FString(""));
// [rdInst v1.35] Removes all the StaticMesh Components for this actor
void rdRemoveAllStaticMeshes();
// [rdInst v1.00] Finds the USceneComponent attached to the RootComponent that is a Folder for ChildActors, finding it from the specified Name
USceneComponent* rdFindFolderCompFromName(const FString& folder);
// [rdInst v1.22] Tests if the Actor has moved or changed visibility
void rdTestForActorChange(bool testTransform,bool testVisibility);
// [rdInst v1.35] rdReseatMeshInstances
int32 rdReseatMeshInstances(UStaticMesh* mesh,const FVector& shift);
// [rdInst v1.50] rdReseatMeshInstances
int32 rdReseatMeshInstancesX(const FName sid,const FVector& shift);
// [rdInst v1.35] Helper Function that Sets the Label (Editor only) of the Actor
void rdSetActorLabel(const FName label);
// [rdInst v1.00] Gets the Name of the Component Folder
FString rdGetFolderName(USceneComponent* comp);
// [rdInst v1.24] Returns True if the world pointed to by this actor is the same as the game viewport
bool rdIsRealWorld();
// [rdInst v1.10] Returns the Static Array of Dirty rdActors
static TArray<ArdActor*>& rdGetDirtyList();
// [rdInst v1.20] Returns the Static Array of rdActor with tick hooks
static TArray<ArdActor*>& rdGetTickHookList();
// [rdInst v1.20] Add this Actor to the TickHook List - receive ticks in editor
void rdAddToTickHookList();
// [rdInst v1.20] Remove this Actor from the TickHook List
void rdRemFromTickHookList();
// [rdInst v1.10] The singular Base Actor for Instance Handling and Actor Pooling
ArdInstBaseActor* rdGetBase();
// [rdInst v1.35] Getter and Setter of the SplineInstanceData from rdPopulateSpline and rdPopulateSplinePMC
TArray<FrdSplineInstanceData>& GetSplineInstanceData();
void SetSplineInstanceData(const TArray<FrdSplineInstanceData>& instData);
// [rdInst v1.00] Node to get the current RandomStream for the Actor. If this Actor has parents, the Eldest's RandomStream is returned
FRandomStream& rdGetRandomStream();
// [rdInst v1.50] Sets the Geometry Collection for the Component and Resets it
void rdSetGeometryCollection(UGeometryCollectionComponent* gcComp,UGeometryCollection* gc);
Section 3.12. rdActor – Data and Structures
// [rdInst v1.00] The Current Theme name, can be blank meaning themes are disabled
FString currentTheme;
// [rdInst v1.00] When True, the whole actor and all ISMs will be hidden by default
bool bStartHidden=false;
// [rdInst v1.00] The Location Randomization for each of the child Actors is multiplied with this
FVector locMultiplier;
// [rdInst v1.00] The Rotation Randomization for each of the child Actors is multiplied with this
FRotator rotMultiplier;
// [rdInst v1.00] The Scale Randomization for each of the child Actors is multiplied with this
FVector scaleMultiplier;
// [rdInst v1.00] The Show Probability for each of the child Actors is multiplied with this
float showMultiplier;
// [rdInst v1.10] When True, other rdActors can copy our InstanceData and delete us (we're just a container)
uint8 bCanBeAssimilated:1;
// [rdInst v1.00] When True, a new Random Seed is generated every time this Actor is Constructed
uint8 bRandomStart:1;
// [rdInst v1.00] The Seed to use for the RandomStream
int32 randomSeed=0;
// [rdInst v1.00] When this is True, the RandomStream specified in this Actor is used, otherwise the OuterMost ArdActor's one is used
uint8 bOverrideRandom:1;
// [rdInst v1.00] The RandomStream used by this Actor. If this Actor has Outer ArdActors, their RandomStream is used for congruity
FRandomStream randomStream;
// [rdInst v1.00] When this is True, the Theme specified in this Actor is used, otherwise the OuterMost ArdActor's Theme is used
uint8 bOverrideTheme:1;
// [rdInst v1.00] The Mode this ArdActor is. Each Mode behaves differently, see the rdActorMode Enumeration
TEnumAsByte<rdActorMode> actorMode;
// [rdInst v1.00] The Folder of Actors to Show when this Actor is in ThereCanBeOnlyOne Mode
FString showFolder;
// [rdInst v1.00] Internal collated list of instances (do not touch)
TMap<UStaticMesh*,FrdInstanceSettingsArray> InstanceData;
// [rdInst v1.20] When ticked, the instances are created from the InstanceFastArray and the InstanceRandomizedArray. Please note that ticking this in an existing BP will REMOVE all existing instance data created from older versions
uint8 bCreateFromArrays:1;
// [rdInst v1.20] This is an array of UStaticMeshes and transforms for adding as instances (Fast, no randomization)
TArray<FrdAddInstanceFastArray> InstanceFastArray;
// This is an array of UStaticMeshes and transforms for adding as instances (Randomized)
TArray<FrdAddInstanceRandomizedArray> InstanceRandomizedArray;
// [rdInst v1.20] This contains the position in row/column/layer of a built system (see rdBuildBuddy)
FrdPositionInfo positionInfo;
// Bool to Destroy any Attached Actors when this is Destroyed
uint8 bDestroyAttachedActors:1;
// [rdInst v1.35] Bool when set, recurses all components when setting the visibility
uint8 bRecurseVisibilityChanges:1;
// [rdInst v1.35] True when StaticMesh mode is on (ISMs are replaced with SMs)
uint8 bStaticMeshMode:1;
// [rdInst v1.35] Set to true to be ignored by proxy scans
uint8 bScanForProxy:1;
// [rdInst v1.35] the index of the instance for a proxy instance
int32 proxyInstanceIndex=-1;
// [rdInst v1.35] Set to true to edit individual instances
uint8 bEditInstances:1;
// [rdInst v1.35] A DataAsset containing all the data of a prefab. Will be used in next release for dynamic prefab swapping and template pooled actors
UrdInstanceVault* instanceVault=nullptr;
// [rdInst v1.35] UrdInstanceVault
UCLASS(BlueprintType)
class UrdInstanceVault : public UrdStateDataAsset {
GENERATED_BODY()
public:
// The Current Theme name, can be blank meaning themes are disabled
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FString currentTheme;
// When True, the whole actor and all ISMs will be hidden by default
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
bool bStartHidden=false;
// The Location Randomization for each of the child Actors is multiplied with this
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FVector locMultiplier;
// The Rotation Randomization for each of the child Actors is multiplied with this
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FRotator rotMultiplier;
// The Scale Randomization for each of the child Actors is multiplied with this
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FVector scaleMultiplier;
// The Show Probability for each of the child Actors is multiplied with this
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
float showMultiplier;
// When True, other rdActors can copy our InstanceData and delete us (we're just a container)
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
uint8 bCanBeAssimilated:1;
// When True, a new Random Seed is generated every time this Actor is Constructed
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
uint8 bRandomStart:1;
// The Seed to use for the RandomStream
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
int32 randomSeed=0;
// When this is True, the RandomStream specified in this Actor is used, otherwise the OuterMost ArdActor's one is used
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
uint8 bOverrideRandom:1;
// The RandomStream used by this Actor. If this Actor has Outer ArdActors, their RandomStream is used for congruity
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FRandomStream randomStream;
// When this is True, the Theme specified in this Actor is used, otherwise the OuterMost ArdActor's Theme is used
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
uint8 bOverrideTheme:1;
// The Mode this ArdActor is. Each Mode behaves differently, see the rdActorMode Enumeration
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
TEnumAsByte<rdActorMode> actorMode;
// The Folder of Actors to Show when this Actor is in ThereCanBeOnlyOne Mode
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FString showFolder;
// Internal collated list of instances (do not touch)
UPROPERTY(EditDefaultsOnly,Category="rdActor",meta=(DisplayName="(Do Not Edit)"))
TMap<UStaticMesh*,FrdInstanceSettingsArray> InstanceData;
// When ticked, the instances are created from the InstanceFastArray and the InstanceRandomizedArray. Please note that ticking this in an existing BP will REMOVE all existing instance data created from older versions
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
uint8 bCreateFromArrays:1;
// This is an array of UStaticMeshes and transforms for adding as instances (Fast, no randomization)
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
TArray<FrdAddInstanceFastArray> InstanceFastArray;
// This is an array of UStaticMeshes and transforms for adding as instances (Randomized)
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
TArray<FrdAddInstanceRandomizedArray> InstanceRandomizedArray;
// This contains the position in row/column/layer of a built system (see rdBuildBuddy)
UPROPERTY(EditAnywhere,BlueprintReadWrite,Category="rdActor")
FrdPositionInfo positionInfo;
};