First things first… learn to use code tags:
Using code tags properly page-2#post-3334556
Also you seem to want to handle a given Event… so why not just have a static class with the InitializeOnLoad:
Then in the static constructor for that class register for the update event:
And do it there.
If you still need to toggle it at this point… maybe also have a hotkey, or a MenuItem, that toggles a static bool in this script. And in your update method you don’t do anything if the bool is flagged in whatever manner.
If you REALLY need it as this editor script in your post (maybe you do, I don’t know… I can’t read that horrible paste of code). Again, have this toggle, and call DrawDefaultInspector from your script if you want it to behave the default way unity does.