I've been working on some custom build scripts, which will manipulate the references of certain MonoBehaviours.
IPreprocessBuildWithReport to do the manipulation, and I want to reset the references when the build completes. Even if the build fails, I want to do the operation, but I want to do some additional stuff if it fails. I'm also using
IProcessSceneWithReport as well.
I've tried putting a Debug.Log in
OnPostProcessBuild. I'm building without JAVA path defined, for Android, or without the Keystore password, which fails the build. The
IPreprocessBuildWithReport correctly prints the Debug, but the others don't.
Is there any class or interface which has a callback for Build Failure which I can use? I've tried to get the summary from the
OnPreprocessBuild, but the result is always returning
Edit: I would also like to make the same changes if the Build was cancelled, rather than just if it was failing.
Platforms: Windows, Android