Game.Rendering.AreaColorData
Assembly:
Namespace: Game.Rendering
Type: struct
Base: System.ValueType
Summary:
A small value-type container used to store color information for an area in the rendering system. It wraps a Unity.Mathematics.float3 which typically encodes RGB color components as floats (commonly in the 0..1 range). This struct is intended for lightweight storage and passing of area color data within rendering code and jobs.
Fields
public Unity.Mathematics.float3 m_Color
Stores the color components for the area. The three float components correspond to (x = R, y = G, z = B). Values are floats and are usually interpreted in linear color space or normalized (0..1), depending on the rendering pipeline context.
Properties
- None. This struct exposes its data directly via the public field.
Constructors
public AreaColorData()
Default value-type constructor (provided by C#). Use this or an object initializer to set m_Color.
Methods
- None.
Usage Example
using Unity.Mathematics;
using Game.Rendering;
// initialize via object initializer
var areaColor = new AreaColorData { m_Color = new float3(1f, 0.5f, 0f) }; // orange
// or set after construction
AreaColorData another = default;
another.m_Color = new float3(0f, 0.75f, 1f); // cyan-ish
Notes: - If this struct is used in multithreaded contexts (e.g., jobs), prefer copying instances rather than holding references — it's a value type and safe to copy. - The interpretation of m_Color (gamma vs linear, alpha handling) depends on the consuming rendering code; this struct only stores three float components.