CreateSky
From Onset Developer Wiki
Description
Create the default sky system on a custom map. This only works on custom maps.
The original sky includes a sky atmosphere, directional lights, exponential height fog and a sky light component. Your custom map scene can therefore be dark without any sky. After using CreateSky, the sky and time functions are working as usual.
Syntax
CreateSky()
Parameters
- This function has no parameters.
Return Value
- Returns an AActor reference to the sky actor. false on error.
Example
AddEvent("OnPackageStart", function()
print("OnPackageStart")
print(GetWorld():GetMapName())
-- If the current map is not the original Island map then spawn the original sky.
if GetWorld():GetMapName() ~= "Island" then
CreateSky()
end
end)