function SetSkyLight() {If (during the day) {render settings . skybox = day s" />

Traditional Culture Encyclopedia - Weather forecast - Does unity have a plug-in to simulate lightning weather?

Does unity have a plug-in to simulate lightning weather?

There are several methods: 1. Make a few Skybox, and then switch at some time. For example:

& ltpre t="code" l="js "> function SetSkyLight() {

If (during the day) {

render settings . skybox = day sky;

skyLight.color = dayColor

}

Otherwise {

render settings . sky box = night sky;

skyLight.color = nightColor

}

}2. Write a shader to control the blending of sky maps. 3. Make a parallel light, that is, the main light source, to simulate the sun, and then rotate the whole scene or parallel light, which is equivalent to rotating the earth.

4. Use plug-ins, such as time plug-ins, alternation of day and night, atmospheric scattering, cloud changes, weather systems and sun and moon lighting. The case project after Unity 5 also shows the content of day and night rotation.