Class AircraftLight
Represents a single aircraft light that can consist of multiple light sources (Unity Lights and/or emissive meshes). Provides unified control for toggling complex light assemblies on and off.
Namespace: NWH.Aerodynamics.AircraftController.Effects.Lights
Assembly: NWH.Aerodynamics.dll
Syntax
[Serializable]
public class AircraftLight
Remarks
Aircraft lights often combine multiple visual elements: for example, a landing light might use a spotlight for the beam and an emissive mesh for the lens. This class manages all components as a single logical light that can be turned on/off together.
Fields
| Edit this page View SourceisOn
Declaration
protected bool isOn
Field Value
| Type | Description |
|---|---|
| bool |
lightSources
Collection of all light sources that together comprise this aircraft light. Can include Unity Lights (for illumination) and emissive meshes (for lens glow).
Declaration
[Tooltip(" All the light sources representing the vehicle light.\r\n E.g. low beam can be represented by a directional light to represent light beam and\r\n and emissive mesh to represent light optics.")]
public List<LightSource> lightSources
Field Value
| Type | Description |
|---|---|
| List<LightSource> |
Remarks
Example: A landing light might contain a spotlight for the beam and an emissive mesh for the lens appearance, both controlled as a single unit.
Properties
| Edit this page View SourceOn
Gets or sets the current on/off state of this aircraft light. When changed, affects all associated light sources.
Declaration
public bool On { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceSetState(bool)
Declaration
public void SetState(bool state)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | state |
Toggle()
Declaration
public void Toggle()
TurnOff()
Turns off the light source or disables emission on the mesh. Mesh is required to have standard shader.
Declaration
public void TurnOff()
TurnOn()
Turns on the light source or enables emission on the mesh. Mesh is required to have standard shader.
Declaration
public void TurnOn()