Table of Contents

Fog Of War World


The central manager component. There should be exactly one Fog Of War World in your scene. It owns every global fog setting, drives revealer and hider updates, and renders the fog.

FogOfWarWorld is accessible from code as a singleton via FogOfWarWorld.instance.

Setup

See Getting Started: Fog Of War World for adding the component and setting the essential buffer limits.

Properties

The component exposes a large number of properties, fully documented under Configuration → Fog Of War World, organized to match its inspector:

Inspector section Reference
FOW Rendering Options (General Rendering, Fog Appearance, Extra Rendering) Rendering Options
FOW Sampling Mode Sampling Mode
FOW Texture Options (resolution, hiders, regrow) Texture Options
FOW Bounds Bounds
Configuration and Optimizations Configuration & Optimizations
Utility Options Utility Options

Essential Limits

Property Type Default Description
Max Num Revealers int 256 Maximum revealers active at once.
Max Num Segments Per Revealer int 128 Maximum sight segments per revealer.
Initial Hider Pool Capacity int 512 Initial hider capacity (auto-resizes, with a hitch).
Is 2D? bool false Switches the system to 2D mode.
Game Plane enum (XZ / XY / ZY) XZ The world plane the fog is calculated on (3D).

Scripting

FogOfWarWorld has an extensive public API for runtime control, fog sampling, save/load, and more. See the Fog Of War World API.

using FOW;

// the active Fog Of War World
var fow = FogOfWarWorld.instance;