VisionSource
Any entity with VisionSource component will continuously uncover the fog around itself.
Overview
| Type | Kind | Purpose |
|---|---|---|
VisionSourceAuthoring |
MonoBehaviour |
Placed on a sub-scene GameObject; baked into ECS at build/enter play mode |
VisionSource |
IComponentData |
The runtime ECS component used by CalculateVisionSystem |
VisionSourceAuthoring (Inspector)
Add VisionSourceAuthoring to any GameObject inside a Unity sub-scene that should act as a vision source.
| Property | Type | Default | Description |
|---|---|---|---|
| Shape | VisionShape |
Circle |
The geometry of the vision area: Circle, Square, or Triangle |
| Layer | VisionLayer |
R |
Determines which fog layer this source reveals (see Vision Layers) |
| Position Offset | Vector2 |
(0, 0) |
Local XZ offset from the entity's pivot |
| Rotation Offset | float |
0 |
Angle offset in degrees applied on top of the entity's world rotation |
| Scale | Vector2 |
(1, 1) |
Width (X) and height (Z) of the vision area |