Skip to content

Game.Prefabs.Climate.AtmosphereProperties

Assembly: Game
Namespace: Game.Prefabs.Climate

Type: class AtmosphereProperties

Base: OverrideablePropertiesComponent

Summary:
A prefab component used by weather prefabs to expose and bind aurora-related atmosphere properties to a HD (High Definition) sky Volume. Specifically it holds overrideable MinFloatParameter fields for aurora borealis emission and speed multipliers and, when binding volume properties, it acquires the PhysicallyBasedSky volume component and copies the corresponding HD volume parameters into these fields. This allows weather prefabs to control aurora appearance via the game's volume/sky system.


Fields

  • public MinFloatParameter m_AuroraBorealisEmissionMultiplier = new MinFloatParameter(0f, 0f)
    Holds the aurora borealis emission multiplier as a MinFloatParameter (value and minimum). Default value is 0f with minimum 0f. This parameter is intended to be overrideable by the prefab and mirrors the PhysicallyBasedSky.auroraBorealisEmissionMultiplier HD volume parameter.

  • public MinFloatParameter m_AuroraBorealisSpeedMultiplier = new MinFloatParameter(1f, 0f)
    Holds the aurora borealis speed multiplier as a MinFloatParameter. Default value is 1f with minimum 0f. Mirrors the PhysicallyBasedSky.auroraBorealisSpeedMultiplier HD volume parameter.

Properties

  • (None declared in this class.)

Constructors

  • public AtmosphereProperties()
    No explicit constructor is declared in the source; the class uses the default parameterless constructor. Field initializers set the default MinFloatParameter values shown above.

Methods

  • protected override void OnBindVolumeProperties(UnityEngine.Rendering.Volume volume)
    When the prefab system binds volume properties for this component, this override ensures a PhysicallyBasedSky component exists on the provided Volume (using VolumeHelper.GetOrCreateVolumeComponent). It then copies the HD PhysicallyBasedSky aurora parameters into the local overrideable fields:
  • Copies component.auroraBorealisEmissionMultiplier -> m_AuroraBorealisEmissionMultiplier
  • Copies component.auroraBorealisSpeedMultiplier -> m_AuroraBorealisSpeedMultiplier

This ties the prefab-level overrideable parameters to the underlying HD volume component so the weather prefab can modify aurora behavior.

Usage Example

// AtmosphereProperties is normally used inside a weather prefab. The engine calls
// OnBindVolumeProperties during prefab initialization to bind HD sky parameters.
// Example (conceptual): when a Volume is prepared for a weather prefab, AtmosphereProperties
// will ensure the PhysicallyBasedSky component exists and copy its aurora parameters.

protected override void OnBindVolumeProperties(Volume volume)
{
    // (This method is already implemented by AtmosphereProperties)
    // It will:
    // - Ensure a PhysicallyBasedSky component exists on the volume
    // - Copy auroraBorealisEmissionMultiplier and auroraBorealisSpeedMultiplier
    //   from the PhysicallyBasedSky component into the prefab's overrideable fields.
    base.OnBindVolumeProperties(volume);
}

Additional notes: - The class is decorated with [ComponentMenu("Weather/", new Type[] { typeof(WeatherPrefab) })], so it appears under the Weather menu and is intended for use with WeatherPrefab assets. - Dependencies: uses UnityEngine.Rendering.Volume and UnityEngine.Rendering.HighDefinition.PhysicallyBasedSky; MinFloatParameter comes from the game's rendering parameter types (Game.Rendering).