add skybox||doc135728

September 20, 2022


 GameSettings:addSky(right, left, top, bottom, back, front, time, transition) 


Add skybox.


  • When more than one skybox information is added, the skybox in the scene will switch to the skybox of the corresponding time period according to the day length of the game, so as to achieve the sky change when day and night alternate.
  • The value range of the time parameter here is 0 ~ 23.999, which refers to the time value calculated by the ratio of the one-day duration of the scene in the editor game settings


Variable name type Description
right string Right image path
left string left image path
top string top image path
bottom string bottom image path
back string back image path
front string previous image path
time float Skybox existence time, the value range is 0 ~ 23.999
transition float The speed of transition to the current skybox, ranging from 0 to 1

Code Samples

Blockman.Instance().gameSettings:addSky( "Media/Textures/pocket_edition/sky/Sky03_right.png",