Hello everyone! I’m working on an Android game. I would like to make some buttons appear when the user pushes the pause button. I would like to achieve two other effects also:
- the screen becomes darker
- the new buttons that appear, appear with a transition effect.
I’m using this code right now:
Simply, if the pause button is pressed make a grey semi-transparent texture fill the screen and make other buttons appear.
function OnGUI () {
if ((GUI.Button(Rect(100,100, 50, 50), "", "pausebutton"))){
GUI.DrawTexture(Rect(0,0, Screen.width, Screen.height), ScreenCover, ScaleMode.StretchToFill);
GUI.Button(Rect(200,200, 50, 50), "", "otherbutton");
......and so on..
But this doesn’t work. The semi-transparent texture and the buttons don’t appear when i press the pause button. Second problem, how can i make these buttons appear with some transition effect, like a simple wipe effect, for example? Thanks for your help!