Section 3.6.3. rdActor – Instancing – Utilities

// [rdInst v1.24] Returns the InstancedStaticMeshComponent for the StaticMesh
UInstancedStaticMeshComponent* rdGetInstanceGen(UStaticMesh* mesh,bool create=true);

// [rdInst v1.00] Returns the HierarchicalInstancedStaticMeshComponent for the StaticMesh
UHierarchicalInstancedStaticMeshComponent* rdGetHInstanceGen(UStaticMesh* mesh,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.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.00] Returns the last Instance Index created for the StaticMesh, returns -1 if there are none
int32 rdGetLastInstanceIndex(UStaticMesh* mesh);

// [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);