Hello. When displaying a toolbar, is there a way to hide certain buttons unless a certain condition is being met? To give some context, I have a have a toolbar where each button is a type of power up. I only want the player to be able to see/select a button if they have enough of that power up in their inventory. For example, if they have 10 of power up B, 0 of power up C and 4 of power up D, there would just be an empty space where the button for power up C should be.
You could just skip rendering of that button (or if you use GUILayout you couold render something invisible in its place). But even better, render it always, but disable it. Use GUI.enabled=false; before and GUI.enabled=false; after the button line.