Stop Script Completely. Doesn't Execute Another Line Of Code.

So I’ve been trying to figure out how to completely stop a script right in it’s tracks so that it doesnt execute another line of code. I tried disabling the script, but it always finished up what it was doing. Anyone know anything else I could try?

you can terminate any method in a script at any point by using “return;”

however, if you have code following it, you’ll get a “Warning Unreachable code detected”…

it’s a warning, which is annoying so it should be used in a conditional check to see if what is happening deserve an abrupt stop of the script at that point… if it is used in say “Update()…”, of course it gets run a lot :slight_smile:

not sure that’s what you’re looking for…