SeinARTS Fog Of War Library
Class · USeinFogOfWarBPFL : UBlueprintFunctionLibrary
#include "Lib/SeinFogOfWarBPFL.h"
deterministic: safe in simulation code
Blueprint nodes for reading fog of war: whether a cell is visible or explored, whether an entity is visible to a player, which player the local machine observes, and changing an entity’s visibility layers for cloak and detection effects.
Blueprint nodes
Section titled “Blueprint nodes”Is Cell Visible
Section titled “Is Cell Visible”Is the cell at WorldPos currently visible to Observer on the given vision layer? LayerName resolves to a bit: “Normal” → V bit, “Explored” → E bit (sticky history), any other name matches USeinFogOfWarSettings::VisionLayers[i].LayerName (enabled slots only). Unknown names return false while fog is active. Returns true when fog is disabled or its implementation has no runtime data, matching the Line of Sight Resolver’s permissive fallback. Invalid world contexts return false.
Defaults: LayerName = "Normal".
static bool SeinIsCellVisible(const UObject* WorldContextObject, FSeinPlayerID Observer, const FVector& WorldPos, FName LayerName = "Normal");Is Cell Explored
Section titled “Is Cell Explored”Has Observer ever explored the cell at WorldPos? Sticky per match — once set, stays set until the next match start.
static bool SeinIsCellExplored(const UObject* WorldContextObject, FSeinPlayerID Observer, const FVector& WorldPos);Get Cell Bitfield
Section titled “Get Cell Bitfield”Raw EVNNNNNN byte at the cell containing WorldPos from Observer’s VisionGroup. Bit 0 = Explored (sticky), bit 1 = Normal visibility, bits 2..7 = custom layers N0..N5. Advanced: most BP callers want SeinIsCellVisible / SeinIsCellExplored instead.
static uint8 SeinGetCellBitfield(const UObject* WorldContextObject, FSeinPlayerID Observer, const FVector& WorldPos);Is Entity Visible
Section titled “Is Entity Visible”Is Target currently visible to Observer under the active fog’s entity-visibility policy? Honors owner visibility, authored emission layers, volumetric footprints, and the Always Visible, Visible Once Seen, and Visible Once Explored policies. A neutral observer disables filtering. A disabled fog implementation or missing runtime fog data permits visibility. Use Is Cell Visible for a raw layer check at a specific position.
static bool SeinIsEntityVisible(const UObject* WorldContextObject, FSeinPlayerID Observer, FSeinEntityHandle Target);Get Local Observer
Section titled “Get Local Observer”The player whose vision this machine shows: the local player, or once it is defeated the first teammate still playing, then no player (the whole map). Neutral (id 0) without a local player.
static FSeinPlayerID SeinGetLocalObserver(const UObject* WorldContextObject);Is Local Player Spectating
Section titled “Is Local Player Spectating”True when the local player is defeated and watches the rest of the match, for a spectator HUD. Get Local Observer says whose view it follows.
static bool SeinIsLocalPlayerSpectating(const UObject* WorldContextObject);Get Entity Emission Mask
Section titled “Get Entity Emission Mask”Read Entity’s current FogVisibilityLayerMask. Returns 0 if the entity has no Fog Visibility Data authored.
static int32 SeinGetEntityEmissionMask(const UObject* WorldContextObject, FSeinEntityHandle Entity);Set Entity Emission Mask
Section titled “Set Entity Emission Mask”Overwrite Entity’s FogVisibilityLayerMask. Use for clean state swaps (e.g. ability activates cloak → set to N0; ability ends → set back to Normal). No-op if the entity has no Fog Visibility Data authored.
static void SeinSetEntityEmissionMask(const UObject* WorldContextObject, FSeinEntityHandle Entity, ) int32 NewMask);Add Entity Emission Layers
Section titled “Add Entity Emission Layers”OR LayersToAdd into Entity’s FogVisibilityLayerMask. Use for additive ability effects.
static void SeinAddEntityEmissionLayers(const UObject* WorldContextObject, FSeinEntityHandle Entity, ) int32 LayersToAdd);Remove Entity Emission Layers
Section titled “Remove Entity Emission Layers”Clear LayersToRemove from Entity’s FogVisibilityLayerMask. Use for ability-end / dispel cleanup.
static void SeinRemoveEntityEmissionLayers(const UObject* WorldContextObject, FSeinEntityHandle Entity, ) int32 LayersToRemove);