Doing stuff before Build starts


I would like to be able to perform some operations before a build starts,
e.g validations, manipulating some Android Manifest, etc…

I know I can do stuff after build using the [PostProcessBuild] attribute.

Is there something like PreProcessBuild? I couldn’t find it.

What are my options?


If you have Unity Pro, you can use BuildPipline.BuildPlayer to start the build process after you’ve performed your pre-build operations. There isn’t currently any pre-build event that you can hook into, so this is really the only way to do it.