Clicking mini menu again to close window

(A.K.) #1

Hi guys!

I was wondering what the best way to make the default mini-menu buttons close the menus they opened when you click them again?

I tried an if statement in blox, (Similar to the one Itsmars gave me in this topic Show and hide button) but it didn’t work and I figured it was probably because the default plygame example UI uses a separate C# script (the “plyRPG_UI” one).

So down to my question!

Is there a way to make this script work with plyblox? Or will I have to edit the original script?


(Marshall Heffernan) #2

You’re correct, it’s conflicting with the RPG_UI script.
Go to the RPG_UI scene, Go to the Menu Button GameObject, and take a look at the Button Component.


You can probably press the minus button (circled in red) to remove the default, scripted action.

Then try with whatever blocks you were using. (this is my Inventory blox)


(A.K.) #3

Awesome! I was nervous about deleting it, but if that works then cool!

Thanks! ^^/