Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCESUBSYSTEMS AND LIBRARIES

UCFGlassShardSubsystem

MODULECrushformINCLUDECFGlassShardSubsystem.hPARENTUWorldSubsystem

Spawns the shards of broken glass panes: one pooled Niagara system per broken pane. A system returns to the pool once it has finished, when its pane is repaired, and at the end of play.

Never spawns on a dedicated server. The default shard system, UCFSettings::DefaultGlassShardSystem, loads asynchronously when play begins and is never loaded synchronously: until it is in memory, GetDefaultSystem returns nullptr.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
UCFGlassShardSubsystem* Get(const UObject* WorldContext)
C++ ONLY

The shard subsystem of WorldContext's world; nullptr when there is none.

bool ShouldSpawnInNetMode(ENetMode NetMode)
C++ ONLY

Whether a world in NetMode spawns shards: everything but a dedicated server.

UNiagaraSystem* GetDefaultSystem() const
PUREC++ ONLY

The default shard system once it is in memory; nullptr until then. Never loads it.

UNiagaraComponent* SpawnShards(UNiagaraSystem& System, FCFGlassShardSpawn&& Spawn, const UObject& Owner, int32 OwnerKey, UObject* Callback)
C++ ONLY

Spawns Spawn's shards as one pooled system made from System, for Owner's unit OwnerKey, and returns it. Returns nullptr for an empty Spawn and when Niagara's pre-cull check rejects the system. Shards beyond CFGlassShardSystem::GetMaxLiveShards() are dropped, and the oldest systems are released while the live shards exceed that cap. Past CFGlassShardSystem::GetShardSystemsPerFrame() in a frame the spawn waits for a later frame, in order, and this returns nullptr; it then starts moved along each shard's velocity by the time it waited, up to CFGlassShardSystem::MaxQueuedFlightSeconds.

void ReleaseOwnedShards(const UObject* Owner, int32 OwnerKey)
C++ ONLY

Removes Owner's live and waiting shards at once; INDEX_NONE: every unit of Owner.

void ReleaseAllShards()
C++ ONLY

Removes every live and waiting shard at once.

int32 GetLiveShardCount() const
PUREC++ ONLY

The number of shards in the live systems.

int32 GetLiveSystemCount() const
PUREC++ ONLY

The number of pooled systems held, finished ones not yet returned included.