Vixen
02b45cc4
csharp
public sealed class SceneLightData

One entity's light, as a scene file holds it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The kind is written as its name and not as its number, the argument Shape makes at length: LightKind's values are shared with the shader and are therefore fixed, but writing the integer would put that agreement into every saved scene as well — so a renumbering that a future format migration could otherwise handle in one place would silently turn every spot light in the project into a point light instead.

Where the light is and which way it faces are not here. They are the entity's transform, and a light that carried its own would be a second answer to a question the file has already answered — the same rule that keeps !LocalTransform out of Components.

Angles are radians, matching the authored record they load into rather than the degrees an inspector shows: one conversion at the edge where a person types, and none in the file.

Fields and properties (8)

  • public string Kind

    Which kind of light — Directional, Point, Spot, Rect or Tube.

  • public Color3 Colour

    Its colour, before intensity.

  • public float Intensity

    How bright it is, as a multiplier on Colour.

  • public float Range

    The distance at which it reaches zero. Unused by a directional light.

  • public float Radius

    Its sphere radius, or a rectangle's half-height.

  • public float InnerAngle

    The inner cone half-angle in radians.

  • public float OuterAngle

    The outer cone half-angle in radians.

  • public float HalfLength

    Half a tube's length, or half a rectangle's width.

Methods (1)

  • public override string ToString()

    Renders it as its kind.

Used by (4)

  • LightTestsVixen.Editor.SceneView.Tests
  • SceneEntityDataVixen.Editor.Core
  • SceneSerializerVixen.Editor.SceneView
  • TypeRegistrationVixen.Editor.Core