Orrery Terrain · OrreryTerrain module · member function
UOrreryTerrainSubsystem::
CommitFeature
Stage, validate and commit one feature (Id 0 = add, else replace in place) as one world transaction.
Declaration
OrreryTerrain::Native::FFeatureId CommitFeature(OrreryTerrain::Native::FFeature Feature,
OrreryTerrain::Native::FGroundUndo* OutUndo = nullptr,
FString* OutReason = nullptr);- Header
#include "OrreryTerrainSubsystem.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrain");in your module’s Build.cs.- Stability
- Stable: changes within a major version only add.
- Thread
- Every member function is game thread unless it says otherwise. (the rule of UOrreryTerrainSubsystem)
Description
Synchronous: when base tiles under the footprint are not resident yet, the commit is refused and those tiles are requested; retry once they have loaded.
The tiles a refused call requested stay pinned (a ground hold), so they load and stay resident even where no streaming source reaches: the bake reads whole blocks and their aprons, several hundred metres past the footprint. Calling again on a later frame therefore succeeds once they are in. A hold is kept per key, the feature's owner and the id it replaces (0 for an add), so builders retrying at the same time keep their own. It ends with the key's next call that is not refused for tiles, after kGroundHoldTimeout_s without a retry, and with the terrain; at most kMaxGroundHolds are kept, and the least recently refused goes first (logged).
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Feature | Orrery | — | The feature to add or replace; Id 0 adds. |
OutUndo | Orrery | nullptr | Optional; the exact inverse, for the caller's undo record. |
OutReason | FString* | nullptr | Optional; why the commit was refused. |
Returns
The feature's id, or 0 if refused (no terrain, read-only, inside a ground-changed broadcast, tiles pending, invalid or outside the terrain, stale).