How to Unload Lightmaps When Additively Loading Scenes?

I’m additively loading scenes to maintain persistent variables and prefabs between them (but not full environments). However, this is maxxing out the lightmap count threshold because it’s adding each scene’s lightmaps each time you transition between them. How do I unload the lightmaps when I additively load another scene?

Figured it out.

Create a script called UnloadLightmaps (C#) and attach it to a game object of your choice that is persistent between additive loads (a manager).

Then invoke the method (such as Unload() )
(See this if you’re using Playmaker: Invoke Method )

Bingo.

Just a warning. Resources.UnloadUnusedAssets terminates any running coroutines silently. Most games can’t handle this one cleanly.