Application.isBatchMode returns true during AssetPostprocessor.OnPostprocessTexture

I want to only run my custom AssetPostprocessor while I have the editor window opened and exclude it from running in my CI pipeline, because it dramatically increases build times.

For some reason though, Application.isBatchMode returns true during the AssetPostprocessor.OnPostprocessTexture API.

Is that meant to be intentional?
If yes, what is the intended way to excluding a post processor conditionally, like in the CI pipeline?

1 Like

In OnPreprocessModel too. Why?

So I did solve my issue by using a custom BUILD_PIPELINE directive that I add to the project settings file during the build process, which works well.

Still weird to see this unintuitive, undocumented behavior.