My Hamburger Menu Asset is available from the Unity 3D Asset Store.
Create an easy and familiar pop out Hamburger Menu with zero coding. Simply drag in the prefabs, run some slight setup (see guide for instructions). Runs on iOS, Android, Windows Phone, PC and Mac (OSX).
Hamburger Menu installation guide can be found here.
Video Tutorial/Guide to incorporate into your own projects.
For support please contact me.
Hamburger Menu Installation Guide
- Create a new Scene (File>New Scene)
- In the Project View, open the ‘Prefabs’ folder within the ‘_HamburgerMenu’ folder.
- Drag the ‘HamburgerCanvas’ and ‘EventSystem’ prefabs from the project view into the Hierarchy view (Do this step one at a time).
- To begin setting up the menu, click the ‘HamburgerCanvas’ in the Hierarchy view and scroll down in the ‘Inspector’ to the ‘Show Menu Script’. Make sure there is a tick in the checkbox next to ‘Show Debug Info’.
- In order to setup the End Positions for both the ‘HamburgerButton’ and the ‘MenuPanel’ make sure that the Unity Editor Scene and Game views are visible at the same time. Additionally, the ‘Maximize on Play’ feature is disabled on the Game view.
- Start by hiding the ‘HambugerButton’ by clicking the ‘HamburgerButton’ and then the checkbox next to the buttons name in the Inspector.
- Click the Play button to begin the game. Now click on the ‘MenuPanel’ in the Hierarchy view, now in the Scene view drag the ‘MenuPanel’ gameobject to the desired location while the menu is active. The Game view will show how it will look in game.
- Next Enable the ‘HamburgerButton’ by clicking on it in the Hierarchy view, and clicking the checkbox next to the name of the gameobject (similar to hiding the button in step 6).
- Now drag the ‘HamburgerButton’ in the Scene view to the desired location.
- In the Console, make a note of the numbers following the ‘MenuPanel position’ as these are the End position for the Menu panel and the ‘HamburgerButton position’ as these numbers are for the button’s position.
- Click the play button again to stop the game running.
- In the Hierarchy view, click the ‘HamburgerCanvas’ and scroll down to the ‘Show Menu Script’ in the Inspector.
- Using the numbers noted down in step 10 for the ‘Hamburgerbutton position’ and the ‘MenuPanel Postion’, populate the ‘Button End Position’ and ‘Menu Panel End Postion’
- Click play again, now click the ‘HamburgerButton’ within the Game view. The Button and Menu should now move to the ‘End Position’ as setup in the previous steps.
- To use this menu within your own projects, delete the ‘ExampleMenuPanel’ from the ‘HamburgerCanvas’ and begin to populate the panel with your own content.
- ***Please note*** Setup will need to be done each time you change the output resolution.