A little extra visual feedback from buttons

We can change the link button states to colors for a little extra visual feedback. For example, we could make it so when you click the “link” button, all the “child” buttons become green and all the “unlink” buttons become red.

This can be done by adding “GUI.color = Color.red;” BEFORE the unlink button if statement, then adding “GUI.color = Color.white;” AFTER the if statement.
Same can be done by using green and white before and after the child button if statement.

4 Likes

That’s a good tip! Thank you!

or just use GUI.contentColor = Color.red; for just changing the text component

You can make a preview of the link to but beware because OnGUI is not called frenquently and you need to add a Repaint() in the Update function for it to take into account that you move your mouse.
I pulled a few hairs trying to find why the link didn’t follow the mouse

1 Like

Privacy & Terms