Unity-Technologies/UnityCsReference · error · NotSupportedException

Lightmapping.additionalBakedProbesCompleted is obsolete. Ple

Error message

Lightmapping.additionalBakedProbesCompleted is obsolete. Please use UnityEngine.LightTransport.IProbeIntegrator instead.

What it means

Lightmapping.additionalBakedProbesCompleted is decorated [Obsolete(..., error:true)] and its add/remove accessors throw NotSupportedException. Unity removed the API in favor of UnityEngine.LightTransport.IProbeIntegrator; the related GetAdditionalBakedProbes overloads are likewise obsolete and return false. Any subscribe/unsubscribe or call is now a hard error.

Source

Thrown at Editor/Mono/GI/Lightmapping.bindings.cs:916

            return BakeSceneAsync(targetScene);
        }

        [FreeFunction("BakeAsync", ThrowsException = true)]
        static extern bool BakeSceneAsync(Scene targetScene);

        public static bool Bake(Scene targetScene)
        {
            RenderPipelineManager.TryPrepareRenderPipeline(GraphicsSettings.currentRenderPipeline);
            return BakeScene(targetScene);
        }

        [FreeFunction("Bake", ThrowsException = true)]
        static extern bool BakeScene(Scene targetScene);

        [Obsolete("Please use UnityEngine.LightTransport.IProbeIntegrator instead. This API is removed and will throw if used.", true)]
        public static event Action additionalBakedProbesCompleted
        {
            add => throw new NotSupportedException("Lightmapping.additionalBakedProbesCompleted is obsolete. Please use UnityEngine.LightTransport.IProbeIntegrator instead.");
            remove => throw new NotSupportedException("Lightmapping.additionalBakedProbesCompleted is obsolete. Please use UnityEngine.LightTransport.IProbeIntegrator instead.");
        }

        [Obsolete("Please use UnityEngine.LightTransport.IProbeIntegrator instead.", true)]
        public unsafe static bool GetAdditionalBakedProbes(int id, NativeArray<SphericalHarmonicsL2> outBakedProbeSH, NativeArray<float> outBakedProbeValidity)
        {
            return false;
        }
        [Obsolete("Please use UnityEngine.LightTransport.IProbeIntegrator instead.", true)]
        public unsafe static bool GetAdditionalBakedProbes(int id, Span<SphericalHarmonicsL2> outBakedProbeSH, Span<float> outBakedProbeValidity, Span<float> outBakedProbeOctahedralDepth)
        {
            return false;
        }
        [Obsolete("Please use UnityEngine.LightTransport.IProbeIntegrator instead.", true)]
        public unsafe static bool GetAdditionalBakedProbes(int id, NativeArray<SphericalHarmonicsL2> outBakedProbeSH, NativeArray<float> outBakedProbeValidity, NativeArray<float> outBakedProbeOctahedralDepth)
        {
            return false;
        }

View on GitHub (pinned to 225b0fbdb5)

Solutions

  1. Remove the subscription and implement UnityEngine.LightTransport.IProbeIntegrator for probe integration callbacks.
  2. If you only need bake completion, use Lightmapping.bakeCompleted instead.
  3. Search and remove all references to additionalBakedProbesCompleted and GetAdditionalBakedProbes.

Example fix

// before
Lightmapping.additionalBakedProbesCompleted += OnProbesCompleted;
// after
// implement UnityEngine.LightTransport.IProbeIntegrator and register it
// with the LightTransport bake pipeline
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Subscribing/unsubscribing Lightmapping.additionalBakedProbesCompleted += handler; calling GetAdditionalBakedProbes; code ported from an older Unity version where this event existed.

Common situations: Upgrading a project across a Unity version boundary where the probe API was replaced by IProbeIntegrator; third-party assets targeting the old API; copy-pasted tutorial code.

Related errors


AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13). Data as JSON: /api/errors/7aec9b52b997278e. Report an issue: GitHub.