- Home /
How to make this custom GUI/Menu?
Hi,
I'm designing a custom GUI a I need some guidance on how to do it. There are two things I should do:
1- Have a menu that holds like 40 icons inside it, they can be laid in With some selection tool or something, that gets on the screen via swipe on center of the screen.
2- Then user can drag one of the images out of that GUI menu and then place it on the screen and move it around, pinch it to scale it and rotate it.
How I can achieve this?
Thanks.
Answer by rutter · Oct 17, 2013 at 01:15 AM
Break a big job into smaller jobs:
Set up an orthographic camera
Create a grid of planes in front of the camera
Apply icon textures to each plane
(Is this happening in the editor, or at runtime?)
Then:
Figure out where on the screen the user is touching
Convert that to a raycast
Figure out which plane is being touched
Allow touches to move the plane (dragging)
Allow touches to rotate the plane
Allow touches to scale the plane
What you're asking for isn't necessarily simple or easy, but there are tutorials around the net that can show you how to achieve most or all of the bullet points above. You may also find libraries such as NGUI or Prime31's UIToolkit helpful.
Answer by Tomer-Barkan · Oct 17, 2013 at 05:36 AM
There are many tutorials out there explaining how to create inventory GUIs. Not exactly an uncommon task. Please do some searching before posting questions.
http://www.youtube.com/watch?v=NsZ_XBCPR2s
There's also asset store packages that do it for you, if you prefer to pay for the work instead of doing everything yourself.
http://forum.unity3d.com/threads/134266-Sleek-Inventory-Complete-GUI-System-for-Inventories
Your answer
Follow this Question
Related Questions
Game Menus WIth Keyboard Input Control 1 Answer
an UP-TO-DATE menu tutorial 1 Answer
Creating a Main Menu: 3 Answers
Bringing window to back GUI.BringWindowToBack() 0 Answers
Accessing the Asset's setting from code using Wizards/Editor classes? 0 Answers