[Editor] How to cancel Build process?

Hi,

Sometimes you’ll hit CMD + B or build, and then go… oh shit! and realise you forgot something and have to endure the next 4 minutes of build (this is a large project) so any escape keyboard shortcuts to cancel it?

alt+f4 on windows xd :slight_smile:
I think that it cant be stoped i never seen a cancel button.

nope, can’t be stopped. You have to wait for it to finish or kill unity itself. Thats cause its fired off into a chain deeper down than the unity editor UI which at that point will be “locked” basically

You can create a three line PowerShell script or a ten line Windows Shell script to kill the build process directly. Very easy to do. Set it as an icon on your desktop and then assign a hotkey directly to the icon = instant build process kill switch.

lol … lots of work if ctrl-shift-escape → u (till unity) or m (till mono) → del → return does it too :wink:

That is essentially what the PowerShell script does, get the list of processes, find the Mono ones, make sure the process was spawned by Unity, and then kills it.

Seems to me it ought be baseline unity feature.

1 Like

well you could just change the shortcut for it…^^

Yes, which is why I keep circling back to my “immature environment” statement in most threads about Unity’s feature set.

Glad this was brought up - I’ve had that “oh shit!” moment many times and always hated that there’s no cancel button :slight_smile:

I usually turn off the sound in Unity when building levels and for some reason I almost always forget to turn it back on before I build, but the second I hit that build button I remember it… annoying :stuck_out_tongue:

Write a script to do it for you. :slight_smile:

Create a short-cut icon with CTRL+ALT+K on your desktop to kill all mono processes:

$wshshell = new-object -comobject wscript.shell
$lnk = $wshshell.createshortcut("$home\Desktop\Kill Bill(d).lnk")
$lnk.IconLocation = "${env:PROGRAMFILES(X86)}\Unity\Editor\Unity.exe"
$lnk.Hotkey = "CTRL+ALT+K"
$lnk.TargetPath = "powershell"
$lnk.Arguments = "-command ""stop-process -name mono"""
$lnk.WindowStyle = 7
$lnk.Save()

P.S. Forgot mention that is PowerShell code. :slight_smile:

try to cancel a build with pvr texture compresion and you’re dead. Never managed to stop this even with the Ctrl+alt+sup.

Launch unity again and the building starts again… pfff