SkyManager

Manages the sky state (this includes sun/moon position, cloud rendering/processing, and sky object processing).  This can be accessed during the playing state via Eternus.World:NKGetSkyManager().

Summary
SkyManagerManages the sky state (this includes sun/moon position, cloud rendering/processing, and sky object processing).
Functions
NKSetSunSets a given sky object as the sun.
NKSetMoonSets a given sky object as the moon.
NKGetSunPositionReturns the normalized position of the sun in the sky.
NKGetMoonPositionReturns the normalized position of the moon in the sky.
NKRemoveSkyObjectDeletes a given sky object from the sky.
NKGetSkyObjectSearches the object layer at the specified depth for an object matching the given name.
NKAddSkyObjectAdds a new Sky Object to the sky at a given depth.

Functions

NKSetSun

Sets a given sky object as the sun.  This object’s position will be used for the sun’s position.

Parameters

SkyObjectThe sky object to be used as the sun.

NKSetMoon

Sets a given sky object as the moon.  This object’s position will be used for the sun’s position.

Parameters

SkyObjectThe sky object object to be used as the moon.

NKGetSunPosition

Returns the normalized position of the sun in the sky.

Returns

vec3The normalized position of the sun in the sky.

NKGetMoonPosition

Returns the normalized position of the moon in the sky.

Returns

vec3The normalized position of the moon in the sky.

NKRemoveSkyObject

Deletes a given sky object from the sky.

Parameters

SkyObjectThe sky object to delete.

NKGetSkyObject

Searches the object layer at the specified depth for an object matching the given name.  If no such object is found, nil is returned instead.

Parameters

stringThe name of the sky object to find.
intThe depth of the layer to search.

Returns

SkyObjectThe sky object matching the search terms or nil, if none was found.

NKAddSkyObject

Adds a new Sky Object to the sky at a given depth.

Parameters

stringThe name of the object to be created.  Note that object names must be unique within a single layer, but are not between different depths.
stringThe name of the script class to be used for this sky object.
stringThe relative filepath, from the Core folder, to the texture to be used.  This texture must also be listed in the SkyObjectTextures/TextureList.txt file.
intThe depth to add this object at.  If no layer is present at this depth, a new one is created.
tableA table containing args to pass to the constructor of the new sky object.
Close