Skip to main content

PrefabSceneSettings

A class in Root.Township, Alta.Environmental.Atmosphere.

Asset with day and night sky, sun, moon and fog curves for a prefab scene, read by PrefabSceneDayTimeManager. Copy pulls matching values from the scene's DayTimeManager.

Constructors​

MemberWhat it is
PrefabSceneSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

27 private and internal fields
MemberWhat it is
private bool btnCopyInspector button that runs Copy.
private Gradient cloudsColorOverDayBacking field for CloudsColorOverDay.
private float debugDayProgressEditor preview of the time of day, from 0 to 1.
private float debugMonthProgressEditor preview of the month (moon) progress, from 0 to 1.
private Gradient fogColorDuringDayBacking field for FogColorDuringDay.
private AnimationCurve fogDensityDuringDayBacking field for FogDensityDuringDay.
private AnimationCurve haloInverseSizeOverDayBacking field for HaloInverseSizeOverDay.
private Gradient moonAmbienceBacking field for MoonAmbience.
private float moonFadeInTimeBacking field for MoonFadeInTime (default 30).
private AnimationCurve moonLightIntensityCurveBacking field for MoonLightIntensityCurve.
private Vector3 moonSpiningAxisBacking field for MoonSpiningAxis.
private float moonToSunDotShiftSun height below the horizon where ambient light starts blending from moon to sun ambience.
private float nightTimeShiftBacking field for NightTimeShift.
private Gradient skyBotcolorBacking field for SkyBotcolor.
private Material skyBoxMaterialBacking field for SkyBoxMaterial.
private AnimationCurve skyColorBotBendingBacking field for SkyColorBotBending.
private AnimationCurve skyColorMidPointPositionBacking field for SkyColorMidPointPosition.
private AnimationCurve skyColorTopBendingBacking field for SkyColorTopBending.
private Gradient skyMidcolorBacking field for SkyMidcolor.
private Gradient skyTopcolorBacking field for SkyTopcolor.
private Gradient sunAmbienceBacking field for SunAmbience.
private Gradient sunColorBacking field for SunColor.
private AnimationCurve sunInverseSizeOverDayBacking field for SunInverseSizeOverDay.
private Gradient sunlightDuringDayBacking field for SunlightDuringDay.
private AnimationCurve sunLightIntensityCurveBacking field for SunLightIntensityCurve.
private Vector3 sunSpiningAxisBacking field for SunSpiningAxis.
private float sunUpSkewBacking field for SunUpSkew.

Properties​

MemberWhat it is
Gradient CloudsColorOverDay { get; }Cloud colour through the day.
float DebugDayProgress { get; }Editor preview of day progress (0 to 1).
float DebugMonthProgress { get; }Editor preview of month progress (0 to 1).
Gradient FogColorDuringDay { get; }Fog colour through the day.
AnimationCurve FogDensityDuringDay { get; }Fog density through the day.
AnimationCurve HaloInverseSizeOverDay { get; }Inverse size of the sun halo through the day.
Gradient MoonAmbience { get; }Ambient colour from the moon.
float MoonFadeInTime { get; }Time the moon takes to fade in.
AnimationCurve MoonLightIntensityCurve { get; }Moonlight intensity through the night.
Vector3 MoonSpiningAxis { get; }Axis the moon turns around.
float MoonToSunDotShift { get; }Shift between moon and sun positions, lerped from this value to 0.
float NightTimeShift { get; }Skybox shift used at night (default -0.004).
Gradient SkyBotcolor { get; }Sky colour near the horizon through the day.
Material SkyBoxMaterial { get; }The skybox material these values drive.
AnimationCurve SkyColorBotBending { get; }How the lower sky gradient bends through the day.
AnimationCurve SkyColorMidPointPosition { get; }Where the middle sky colour sits through the day.
AnimationCurve SkyColorTopBending { get; }How the upper sky gradient bends through the day.
Gradient SkyMidcolor { get; }Middle sky colour through the day.
Gradient SkyTopcolor { get; }Sky colour overhead through the day.
Gradient SunAmbience { get; }Ambient colour from the sun through the day.
Gradient SunColor { get; }Sun colour through the day.
AnimationCurve SunInverseSizeOverDay { get; }Inverse size of the sun disc through the day.
Gradient SunlightDuringDay { get; }Sunlight colour through the day.
AnimationCurve SunLightIntensityCurve { get; }Sunlight intensity through the day.
Vector3 SunSpiningAxis { get; }Axis the sun turns around.
float SunUpSkew { get; }Degrees added past each horizon to the sun's daytime arc, so the sun is up for more than half the cycle.

Methods​

MemberWhat it is
void Copy()Editor helper: copies every field with a matching name from the scene's DayTimeManager into this asset.

Used in​

Members of other types that take, return or hold a PrefabSceneSettings: