Section 2.6.1. rdInstBase- Proxy Setup
The easiest way to set up the Proxies is via the rdInstSettings actor (select from the outliner). You can setup all defaults from there.
Or you can call the rdSetupProxies function directly if you want to turn it on or off at runtime.
// [rdInst v1.35] Sets the process interval (in ticks), distance to swap normal proxies, and distance to swap long-distance proxies
void rdSetupProxies(int32 processInterval,double swapDistance=1000.0f,double longDistanceSwapDistance=20000.0f,int32 idleTicks=10,int32 idleDestructionTicks=40);
// [rdInst v1.35] Sets the rdActor as the manager of proxy state saving
void rdSetProxyStateManager(ArdActor* sProxyStateManager);
// [rdInst v1.35] Adds the SpawnStuffActor to the processing list (C++ only)
void rdRegisterSpawnActor(ArdSpawnStuffActor* spawnActor);
// [rdInst v1.35] Removes the SpawnStuffActor from the processing list (C++ only)
void rdRemoveSpawnActorFromRegister(ArdSpawnStuffActor* spawnActor);
The functions to add Proxies all use the rdProxySetup struct to pass their values.
USTRUCT(BlueprintType,meta=(HasNativeBreak="/Script/rdInst.rdActor.BreakProxySetup",HasNativeMake="/Script/rdInst.rdActor.MakeProxySetup"))
struct FrdProxySetup {
UPROPERTY(Category=rdProxies,EditAnywhere)
UClass* proxyActor=nullptr;
UPROPERTY(Category=rdProxies,EditAnywhere)
FString proxyDataLayerName;
UPROPERTY(Category=rdProxies,EditAnywhere)
UStaticMesh* proxyStaticMesh=nullptr;
UPROPERTY(Category=rdProxies,EditAnywhere)
UStaticMesh* destroyedMesh=nullptr;
UPROPERTY(Category=rdProxies,EditAnywhere)
UClass* destroyedPrefab=nullptr;
UPROPERTY(Category=rdProxies,EditAnywhere)
FTransform destroyedOffset=FTransform::Identity;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bUseWithSphereTrace:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bUseWithLongDistance:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
float longDistance=50000.0f;
UPROPERTY(Category=rdProxies,EditAnywhere)
float proxyPhysicsTimeout=30.0f;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bUseWithDestruction:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bPooled:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bSimplePool:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
int32 pooledAmount=0;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bDontRemove:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bDontHide:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
uint8 bEntireMeshProxy:1;
UPROPERTY(Category=rdProxies,EditAnywhere)
UrdStateDataAsset* savedState=nullptr;
UPROPERTY(Category=rdProxies,EditAnywhere)
bool bCallSwapEvent=false;
};
Four Make utility functions are included to reduce clutter in the BP graph:
// [rdInst v1.43] Make a rdProxySetup structure for an Actor Proxy
FrdProxySetup rdMakeActorProxySetup(UClass* proxyActor,bool bDontHide=false,bool bDontRemove=false,float proxyPhysicsTimeout=30.0f,bool bPooled=false,bool bSimplePool=false,int32 pooledAmount=20,UrdStateDataAsset* savedState=nullptr,bool bCallSwapEvent=false);
// [rdInst v1.43] Make a rdProxySetup structure for a DataLayer Proxy
FrdProxySetup rdMakeDataLayerProxySetup(const FString& proxyDataLayerName,bool bDontHide=false,bool bDontRemove=false,UrdStateDataAsset* savedState=nullptr,bool bCallSwapEvent=false);
// [rdInst v1.43] Make a rdProxySetup structure for a StaticMesh Proxy
FrdProxySetup rdMakeStaticMeshProxySetup(UStaticMesh* proxyMesh,bool bDontHide=false,bool bDontRemove=false,UrdStateDataAsset* savedState=nullptr,bool bCallSwapEvent=false);
// [rdInst v1.43] Add Destruction settings to a rdProxySetup structure
FrdProxySetup rdAddDestructionToProxySetup(const FrdProxySetup& inProxySetup,UStaticMesh* destroyedMesh=nullptr,UClass* destroyedPrefab=nullptr,const FTransform& destroyedOffset=FTransform());