NWBakedLighting

csharp
public sealed class NWBakedLighting : MonoBehaviour

Namespace NodeWorld.SDK.Shared.

The baked lightmaps of a world scene, applied by the scene itself when it loads (client, Play mode): its textures join LightmapSettings.lightmaps (an entry already there with the same textures is shared, a freed entry is reused), then each baked renderer gets its lightmap index and scale-offset. The world publisher writes it from the lightmapper's own storage (Bakery: see NWBakedLightingBuild in the SDK editor), so a world needs no lightmapper script in the client. Light probes and baked reflection probes stay in the scene's lighting data, as Unity loads them.

Constants

NotLightmapped

csharp
public const int NotLightmapped = 0xFFFF

Lightmap index of a renderer that has no lightmap of its own (Unity's "not lightmapped").

Properties

LightmapCount

csharp
public int LightmapCount { get; }

Number of lightmaps of the scene.

RendererCount

csharp
public int RendererCount { get; }

Number of baked objects of the scene.

Methods

Configure

csharp
public void Configure(Texture2D[] color, Texture2D[] direction, Texture2D[] shadowMask, Renderer[] renderers, int[] indices, Vector4[] scaleOffsets, Terrain[] terrains, int[] terrainIndices, Vector4[] terrainScaleOffsets, Light[] lights, int[] lightChannels)

Sets the lightmaps and the baked objects (SDK publisher). Arrays of one item per lightmap / per object.