We have a [PostProcessScene] method that verifies some conditions on the scene as it gets built into an asset bundle / player. I would like to be able to fail that build in case those conditions are not met. so far, i haven't been able to find anything useful. Tried throwing exceptions of different sorts (System.Exception, BuildFailedException) but no luck. The last resort i have is to just kill the Unity editor (Application.Quit or something similar), this will (sort of?) work while running in our CI environment, but i am looking for a nicer solution.