API Reference

UCrimsonObjectPoolSubsystem

A UWorldSubsystem, created for Game and PIE worlds only. Get it with UCrimsonObjectPoolSubsystem::Get(WorldContextObject) in C++ or Get Crimson Object Pool Subsystem in Blueprint.

FunctionReturnsPurpose
AcquireActor(ActorClass, Transform, NewOwner, NewInstigator)AActor*Hands out a live instance, recycling or spawning as needed. Null under HardCap exhaustion, or on a client for a replicated class.
AcquireActorDeferred(ActorClass, NewOwner, NewInstigator)AActor*Returns the instance still dormant so it can be configured before going live. Pair with FinishAcquiringActor.
FinishAcquiringActor(Actor, Transform)voidCompletes a deferred acquire: positions the instance and brings it into play.
ReleaseActor(Actor)boolStands the instance down and parks it, or destroys it if the free list is full. False if it was not pool-owned, already parked, or the caller was a client.
ReleaseActorAfter(Actor, Seconds)voidReleases after a delay. Cancels itself if the actor is released early or destroyed. Calling it again restarts the delay rather than queueing a second release.
CancelPendingRelease(Actor)voidCancels a pending delayed release.
RequestActorQueued(ActorClass, Transform, NewOwner, NewInstigator)int32Queues an acquire served across frames instead of immediately. Returns a request id.
CancelQueuedRequest(RequestId)boolDrops a queued request before it is served.
GetQueuedRequestCount()int32How many requests are still outstanding.
OnPooledActorReadydelegate(AActor* Actor, int32 RequestId). Fires once per queued request, in order. Actor is null if the acquire failed.
PrewarmPool(ActorClass, Count)voidSpawns and parks instances up front. Refused with a warning before the world has begun play.
DrainPool(ActorClass)voidDestroys every free instance of a class. Checked-out instances are dropped from pool ownership.
DrainAllPools()voidAs above, for every class.
GetPoolStats(ActorClass)FCrimsonObjectPoolStatsOne class's counters.
GetAllPoolStats()TArray<FCrimsonObjectPoolStats>Every pool, sorted by class name.
IsPoolOwnedActor(Actor)boolWhether releasing this actor will recycle it rather than do nothing.
IsBypassEnabled()boolStatic. Reads the Crimson.ObjectPool.Bypass cvar.

ICrimsonPoolable

Ships in CrimsonCommon
Include Pooling/ICrimsonPoolable.h, and depend on CrimsonCommon. It lives there rather than in CrimsonObjectPool so that actors in other Crimson plugins can implement it - no Crimson plugin may reference a sibling.
MemberAudiencePurpose
OnAcquiredFromPool(const FTransform& Transform)Blueprint + C++Bring the instance back into play. Implementing the interface makes this the only reactivation that happens.
OnReleasedToPool()Blueprint + C++Stand the instance down. Called while it is still fully active, before the pool applies dormancy.
GetPoolReleaseDelegate()C++ onlyOptional. Return a delegate you broadcast when finished and the pool reclaims the actor automatically. Not a UFUNCTION - a Blueprint cannot hand out a delegate reference, and should call Release Actor instead.
FCrimsonOnPoolableReleaseRequestedC++ onlyDECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(..., AActor*, Actor). The delegate type returned above.

UCrimsonObjectPoolSettings

Project Settings > Crimson > Crimson Object Pool. Config section CrimsonObjectPool.

SettingDefaultPurpose
DefaultCapacity32Free instances retained for a class with no override.
DefaultGrowthPolicyGrowWhat happens when the free list is empty.
bDestroyOnOverCapacityReleasetrueDestroy rather than pool a release that would exceed capacity.
ClassOverridesemptyTMap<TSoftClassPtr<AActor>, FCrimsonObjectPoolClassConfig>. Lookup walks up the class hierarchy.
MaxSpawnsPerFrame2How many NEW actors a queued request may spawn per frame. Per frame, not per second - a hitch is a frame-cost problem.
bBatchPooledAcquirestrueServe queued requests that a warm pool can fill from its free list immediately, without spending the frame budget.
PoolPressureWarningRatio0.9Warn once per class when live count reaches this fraction of capacity. 0 disables.
bUseNetDormancyWhilePooledtruePut replicated actors into DORM_DormantAll while parked. Leave on - see Concept: Replication and Recycling.

Data types

TypeMembers
FCrimsonObjectPoolClassConfigCapacity, GrowthPolicy, PrewarmCount, bDestroyOnOverCapacityRelease
FCrimsonObjectPoolStatsActorClass, PooledCount, LiveCount, TotalCreated, SpawnsAvoided, HighWaterLive, Capacity
ECrimsonObjectPoolGrowthPolicyGrow, HardCap

Console commands

CommandPurpose
Crimson.ObjectPool.Bypass 0|11 makes every acquire a real SpawnActor and every release a real Destroy.
Crimson.ObjectPool.DumpPrints per-class pooled / live / high-water / created / spawns-avoided / capacity.

MCP tools

Gated behind Project Settings > Crimson > Crimson MCP > Enable Crimson MCP (requires an editor restart). All operate on the authoritative PIE world.

ToolKindPurpose
CrimsonObjectPoolToolset.ListPoolsreadEvery pool with its full counters.
CrimsonObjectPoolToolset.SetPoolBypassactSets the bypass cvar.
CrimsonObjectPoolToolset.DrainAllPoolsactDestroys every free instance in every pool.