Global tools show up on that main toolbar button and can effect any kind of object. Context tools obvs only show up for objects with a component they target, these show up in the tool panel.
So, the most simple (but also actually useful) example i could think of is something im calling the LookAt tool - heres a lil video showing how it works. Basically, when we activate this tool we can easily keep objects in frame!
- OnToolGUI() is where the brains of our tool lives
- toolbarIcon, which is a hyper important property unity uses to style our tool! theres a bunch of boilerplate code here to grab an icon.
with these basic building blocks we can build pretty much any tool we want~