Lighting Internals
Access internal lighting APIs to read and write lighting data, light probes, and bake analytics. Provides scriptable wrappers around LightingDataAsset and LightProbes classes, plus detailed bake telemetry callbacks for monitoring and debugging lightmap generation workflows.
com.newblood.lighting-internals 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/lighting-internals.git README Markdown
Copy this to your project's README.md
## Installation
Add **Lighting Internals** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/lighting-internals.git
```
[](https://www.pkglnk.dev/pkg/lighting-internals)Dependencies (1)
README
Lighting Internals Package
Provides access to internal lighting APIs.
ScriptableLightingData
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);
ScriptableLightProbes
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);
LightmappingInternal
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;
}
}
No comments yet. Be the first!