The MenuItem attribute turns any static function into a menu command. Only static functions can use the MenuItem ...
docs.unity3d.com