Create UI slide menu

Hey,

I would like to create a slide menu with the new unity gui. Like on android, if the user slide its finger from the right to the left of the screen or push a button a menu shows up from the right to the left, and return to its position if the user does the inverse slide or push again on the button. I have some questions about this.

For the button I handled it by simply set a trigger on the animator component of my canvas. But I don’t see how to play back the animation if the user clicked again on the button. I don’t see how to reset the trigger, because I only set the trigger when the user click on the button, I need to do another action (to reset the trigger) if he clicked again on it.

And I have another question about the slide with the finger to trigger the animation. Do you think that I can use the new UI system to handle it ? Or do I need to put my own system to handle it ?

Thank you

I explained here how I did it. It might help you.

To play the animation in reverse, you make another one (Copy → Paste) and change its speed to -1.

Okay thank you :). Just a precision, do you know if the event of slide are catch by the new unity gui? Like if I slide my finger from the right to the left, the menu will show up.

I haven’t tested that yet. I only worked with buttons until now, i can’t tell you what happens.