Orbdale Terrain · OrbdaleTerrainPCG module · class
UOrbdaleTerrainPCGSubsystem
ExperimentalThe listener behind UOrbdaleTerrainPCGRefreshComponent: one per world, game thread.
Declaration
UCLASS()
class UOrbdaleTerrainPCGSubsystem : public UTickableWorldSubsystem- Header
#include "OrbdaleTerrainPCGRefresh.h"- Module
PublicDependencyModuleNames.Add("OrbdaleTerrainPCG");in your module’s Build.cs.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
- Thread
- Game thread only.
- Derives from
UTickableWorldSubsystem
Description
Reads the ground change journal (FGroundQuery::ChangesSince) with its own cursor on each tick, and binds the terrain's OnSculptStroke for the stroke state. Residency entries (streaming) are ignored; paint-only entries only reach components with bOnPaint. Changes merge into a box per opted-in component; on a tick the box of each component that is due is grown by its margin, and each PCG component on its actor that the box meets is re-run:
one managed by runtime generation is refreshed through the PCG subsystem's scheduler;
one that is partitioned gets GenerateLocal(true) on its local components under the box;
any other gets GenerateLocal(true).
Also keeps the last revision that changed the ground, the CRC of the terrain data: streaming moves the world's revision but not this one. A journal reset (a load, or falling more than the journal's capacity behind) re-runs every opted-in component over the whole terrain.
Game thread only.
Functions
- Initialize
- Deinitialize
- Tick
- GetStatId
- IsTickableInEditor
- GetEditRevision
The last revision that changed the ground (not a streaming publish); 0 before any edit.
- CreateDatastatic
Make the surface data for this world's terrain.
- IngestChange
Acts on one journal entry as the poll does: Stream-caused and residency-only entries are ignored, a paint-only entry (What == Paint) reaches only components with bOnPaint, any other truth change reaches every opted-in component.
- GetClock
Seconds this subsystem has been ticked: the clock the throttle reads.
- GetRefreshCount
Re-runs counted since the world began, for stats and tests.
- GetPcgCallCount
Calls made into PCG for a kind of component since the world began (zero while DispatchOverride is set); for tests.
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
Dispatch | TFunction< | — | Replaces the real re-run, for tests: called once per PCG component due, with the kind and the grown box. When set, nothing is handed to PCG. |