A do nothing script?

Is there a script that tells unity to do nothing and move on? I am making a script to navigate through multiple levels of menus, so will just a function onmouseup with seperate "if" statements and no "else" statements? Sorry if it is confusing, i couldnt add the actuall script. Thanks.

if you write a simple if statement that returns false the script will do nothing and move on

That is a little confusing. If you are referring to a quick exit-out of a function you can try:

void MaybeDoNothing() { if(needsToDoNothing == true) return; }

That just skips everything after return and leaves the function block entirely.

Hope that helps,



Similarly, you can use "break;" to exit out of conditional statement blocks as well.