Provides access to internal lighting APIs.
Provides access to the information contained in the LightingDataAsset class. To use it, create a new instance and call Read:
var data = ScriptableObject.CreateInstance<ScriptableLightingData>();
data.Read(Lightmapping.lightingDataAsset);In order to save your changes back to the LightingDataAsset, use the Write method:
data.Write(Lightmapping.lightingDataAsset);Provides access to the information contained in the LightProbes class. To use it, create a new instance and call Read:
var probes = ScriptableObject.CreateInstance<ScriptableLightProbes>();
probes.Read(LightmapSettings.lightProbes);In order to save your changes back to the LightProbes, use the Write method:
probes.Write(LightmapSettings.lightProbes);Provides access to the bakeAnalytics callback, which receives detailed information about lightmap bakes. This comes in the form of a JSON string, which can be deserialized through the LightmappingAnalyticsData type.
LightmappingInternal.bakeAnalytics += OnBakeAnalytics;
// ...
static void OnBakeAnalytics(string json)
{
switch (JsonUtility.FromJson<LightmappingAnalyticsData>(json).outcome)
{
case "success":
// Bake completed successfully
break;
case "cancelled":
case "forcestop":
case "interrupted":
// Bake completed unsuccessfully
break;
}
}