Click or drag to resize

WeatherMakerDayNightCycleProfileScript Class

Day night cycle profile, contains all fields and properties for time of day and how they effect everything
Inheritance Hierarchy
SystemObject
  Object
    ScriptableObject
      DigitalRuby.WeatherMakerWeatherMakerDayNightCycleProfileScript

Namespace:  DigitalRuby.WeatherMaker
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class WeatherMakerDayNightCycleProfileScript : ScriptableObject

The WeatherMakerDayNightCycleProfileScript type exposes the following members.

Constructors
  NameDescription
Public methodWeatherMakerDayNightCycleProfileScript
Initializes a new instance of the WeatherMakerDayNightCycleProfileScript class
Top
Properties
  NameDescription
Public propertyDateTime
Get a date time object representing the current year, month, day and time of day in local time
Public propertyDawnDuskMultiplier
1 if it is fully dawn or dusk
Public propertyDayMultiplier
1 if it is fully day
Public propertyhideFlags

Should the object be hidden, saved with the scene or modifiable by the user?

(Inherited from Object.)
Public propertyname

The name of the object.

(Inherited from Object.)
Public propertyNightMultiplier
1 if it is fully night
Public propertyTimeOfDayCategory
Time of day category
Public propertyTimeOfDayTimespan
Time of day as a TimeSpan object
Public propertyTimeOfDayTimeSpan
Get a TimeSpan from the TimeOfDay property
Top
Methods
  NameDescription
Public methodStatic memberCalculateMoonPosition
Calculate moon position
Public methodStatic memberCalculateSunPosition
Calculate the position of the sun
Public methodStatic memberConvertAzimuthAtltitudeToUnitVector
Azimuth and atltidue unit vector
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetInstanceID

Returns the instance id of the object.

(Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberJulianToDateTime
Julian date to System.DateTime
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSetDirty Obsolete. (Inherited from ScriptableObject.)
Public methodToString

Returns the name of the GameObject.

(Inherited from Object.)
Public methodUpdateFromProfile
Update day night cycle using profile settings and light manager state
Top
Fields
  NameDescription
Public fieldAdjustDateWhenDayEnds
Whether to adjust the date when the day ends. This is important to maintain accurate sun and moon positions as days begin and end, but if your time is static you can turn it off.
Public fieldAmbientColorMode
Whether to set the Unity built in ambient colors to the day, dawn/dusk and night ambient colors.
Public fieldAxisTilt
The amount of degrees your planet is tilted - Earth is about 23.439f
Public fieldDawnDuskAmbientColor
Dawn/dusk ambient color, where far right is fully dawn or dusk - alpha is used for intensity
Public fieldDawnDuskAmbientColorEquator
Dawn/dusk ambient equator color, where far right is fully dawn or dusk - alpha is used for intensity
Public fieldDawnDuskAmbientColorEquatorIntensity
Additional daw/dusk ambient equator color intensity
Public fieldDawnDuskAmbientColorGround
Dawn/dusk ambient ground color, where far right is fully dawn or dusk - alpha is used for intensity
Public fieldDawnDuskAmbientColorGroundIntensity
Additional daw/dusk ambient ground color intensity
Public fieldDawnDuskAmbientColorIntensity
Additional daw/dusk ambient color intensity
Public fieldDawnDuskAmbientColorSky
Dawn/dusk ambient sky color, where far right is fully dawn or dusk - alpha is used for intensity
Public fieldDawnDuskAmbientColorSkyIntensity
Additional daw/dusk ambient sky color intensity
Public fieldDay
The day for simulating the sun and moon position - this can change during runtime.
Public fieldDayAmbientColor
Day ambient color, where far right is fully day - alpha is used for intensity
Public fieldDayAmbientColorEquator
Day ambient equator color, where far right is fully day - alpha is used for intensity
Public fieldDayAmbientColorEquatorIntensity
Additional day ambient equator color intensity
Public fieldDayAmbientColorGround
Day ambient ground color, where far right is fully day - alpha is used for intensity
Public fieldDayAmbientColorGroundIntensity
Additional day ambient ground color intensity
Public fieldDayAmbientColorIntensity
Additional day ambient color intensity
Public fieldDayAmbientColorSky
Day ambient sky color, where far right is fully day - alpha is used for intensity
Public fieldDayAmbientColorSkyIntensity
Additional day ambient sky color intensity
Public fieldDayDawnDuskNightGradient
Determines when it is day, dawn/dusk or night, where center of gradient is sun at horizon. Green = day, Red = dawn/dusk, Blue = night. If it's dawn/dusk, the time of day before 12 p.m. will be dawn, after 12 p.m. will be dusk.
Public fieldStatic memberDynamicGIUpdateThresholdSeconds
How many seconds must elapse in time of day time to update dynamic GI should that option be selected
Public fieldStatic memberHighNoonTimeOfDay
Time of day at high noon
Public fieldLatitude
The latitude in degrees on the planet that the camera is at - 90 (north pole) to -90 (south pole)
Public fieldLongitude
The longitude in degrees on the planet that the camera is at. -180 to 180.
Public fieldMonth
The month for simulating the sun and moon position - this can change during runtime.
Public fieldMoonDatas
Current moon info
Public fieldNightAmbientColor
Night ambient color, where far right is fully night - alpha is used for intensity
Public fieldNightAmbientColorEquator
Night ambient equator color, where far right is fully night - alpha is used for intensity
Public fieldNightAmbientColorEquatorIntensity
Additional night ambient equator color intensity
Public fieldNightAmbientColorGround
Night ambient ground color, where far right is fully night - alpha is used for intensity
Public fieldNightAmbientColorGroundIntensity
Additional night ambient ground color intensity
Public fieldNightAmbientColorIntensity
Additional night ambient color intensity
Public fieldNightAmbientColorSky
Night ambient sky color, where far right is fully night - alpha is used for intensity
Public fieldNightAmbientColorSkyIntensity
Additional night ambient sky color intensity
Public fieldNightSpeed
The night speed of the cycle. Set to 0 to freeze the cycle and manually control it. At a speed of 1, the cycle is in real-time. A speed of 100 is 100 times faster than normal. Negative numbers run the cycle backwards.
Public fieldStatic memberSecondsForOneDegree
Number of seconds in one degree
Public fieldStatic memberSecondsPerDay
Number of seconds per day
Public fieldSkyAddColor
Sky add color, center of gradient is sun at horizon.
Public fieldSkyTintColor
Sky tint color, center of gradient is sun at horizon.
Public fieldSpeed
The day speed of the cycle. Set to 0 to freeze the cycle and manually control it. At a speed of 1, the cycle is in real-time. A speed of 100 is 100 times faster than normal. Negative numbers run the cycle backwards.
Public fieldSunData
Current sun info
Public fieldSunIntensityGradient
Control sun intensity where center of gradient is sun at horizon
Public fieldSunTintColorGradient
Tint color of sun, where center is sun at horizon
Public fieldTimeOfDay
The current time of day in seconds (local time).
Public fieldTimeZoneOffsetSeconds
Offset for the time zone of the lat / lon in seconds. Set to -1111 to auto-calculate (just tab out of the text field after you type -1111). Note about -1111: during editor mode, a web service is used. During play mode, longitude is used for fast calculation.
Public fieldUpdateInterval
How often the update cycle updates. Use higher values if you have issues with shadow flickering, etc. Turning on temporal anti-aliasing is also a good way to reduce flicker, though you may have to play with the settings.
Public fieldYear
The year for simulating the sun and moon position - this can change during runtime. The calculation is only correct for dates in the range March 1 1900 to February 28 2100.
Top
Extension Methods
  NameDescription
Public Extension MethodCachedName
Get cached name
(Defined by WeatherMakerObjectExtensions.)
Public Extension MethodSetCachedName
Put name in the cache
(Defined by WeatherMakerObjectExtensions.)
Top
See Also