Editor Script

Cleaning Up Empty MonoBehaviour Event Functions

September 20, 2016

Tags: , , , , , ,

It’s pretty common to see empty MonoBehaviour event functions (such as Awake and Update) left around a codebase. While these don’t do much damage in themselves, they still need to be processed and so create unnecessary overhead, so it’s good to get rid of them.

I’ve just cleaned up a codebase I’ve been working on and created an editor script to search for the different event functions, which you can find here – hope it helps someone!

Also, as a preventative measure, you change the script template so new scripts don’t get an empty Start and Update by default. There’s a guide on how to do that here.



Your email address will not be published.