Is it possible to process a scene right before it’s queued to be built without modifying project files?
Essentially, I have some scenery and props that is combined using MeshBaker and saved as a GameObject instance in the scene. I prefer this workflow instead of creating tonnes of small prefabs.
The GameObjects used for baking are disabled in the scene, and the result is enabled, so everything works from a gameplay perspective. However, these objects (and any referenced meshes/textures) are still included in the build, bloating its size, when I really only need the baked objects.
There’s hooks like OnPostProcessScene, but it both runs when saving scenes normally, and I don’t know if changing the scene during the build-invocation of PostProcessScene will affect the scene on file.