LAZR.PW
Stuff I'm working on.

Day Night Cycle

Simple Day Night Cycle:
[Playable Demo Here]

Type
Name
Description
float
dayLengthSeconds
Day length in seconds.
float
nightLengthSeconds
Day length in seconds.
float
timeOfDay
The current time of day in seconds. It can be modified, and the system will change the state and positions automatically.
float
dayBrighness
Sunlight brightness slider, can also be changed via the “sunLight” variable.
float
nightBrightness
moonlight brightness slider, can also be changed via the “moonLight” variable.
Material
sunMaterial
Material for the sun plane.
Material
moonMaterial
Material for the moon plane.
Transform
sunManager
The parent Transform for the sun and its light.
Transform
moonManager
The parent transform for the moon and its light.
float
sunScale
The scale size of the sun plane.
float
moonScale
The scale size of the moon plane.
GameObject
sun
The sun plane.
GameObject
sunLight
The sun directional light.
GameObject
moon
The moon plane.
GameObject
moonLight
The moon directional light.
Transform
mainCamera
Your main camera.
Transform
skyboxCamera
The skybox camera, used to draw behind the main camera once you've followed the quick setup guide.
float
dayProgress
0.0f to 1.0f indicator of day progress.
float
nightProgress
0.0f to 1.0f indicator of night progress.
string
GetState()
Returns “DAY” or “NIGHT”.
float
GetProgress()
Gets the 0.0f to 1.0f progress of the current state.
Camera
GetCamera()
Returns the “skyboxCamera”.


No comments:

Post a Comment