x


Developing a Dynamic GUI

Hello community, I was wondering if there was any way to develop a dynamic GUI (one that alter's it's shape, tweens GUI elements to be drawn on the screen, etc.) in Unity because I am tired of the static-stay in one place-GUI. You know how Mac OS X has all of those fancy visuals in their GUI, is there anyway I could do something like that in Unity? Thanks! :)

more ▼

asked Feb 25 '12 at 03:14 AM

DeGeeGin gravatar image

DeGeeGin
11 2 2 2

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Well, if you're talking built in functionality, then no, there's not really anything that Unity has provided to you for making complex and dynamic menu systems. This is why the top paid solutions on the Asset Store for Unity have been GUI solutions, because a lack of a decent integrated system.

With that said, if you want to go the lowest cost route possible, you can create your menu system utilizing GUITextures. GUITextures are drawn on top of everything, and can be tweened by referencing their gameObjects. A great all around animation system would be iTween, found at the following link:

http://itween.pixelplacement.com/index.php

What you can do, is create an empty Game Object, and then set all your GUITextures how you would want them placed in one menu group, and then set them as children to that empty Game Object, in essence making this function as a panel. It's important for easy placement and movement of these panels that you set your empty Game Object at Vector3.zero to make it simpler to work with.

So to animate the panel, you could simply reference the Game Object in iTween to move all the GUITexures off of scene. To animate individual GUITextures, you could reference the Game Object by GUITexture.gameObject when passing it into iTween to animate localScale, position, etc.

It is important to note that if you choose to go this route, you cannot Atlas your GUI Textures causing a dramatic increase in package size due to the compartmentalized nature of doing things this way. Ultimately if you're serious about your development, I would recommend nGUI as your GUI solution to make your life a whole lot easier:

http://forum.unity3d.com/threads/114833-NGUI-(Next-Gen-UI)-demo-amp-final-feedback-request

more ▼

answered Feb 25 '12 at 08:29 PM

dannyskim gravatar image

dannyskim
3.9k 5 7 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3698
x488
x278
x233
x73

asked: Feb 25 '12 at 03:14 AM

Seen: 1754 times

Last Updated: Feb 25 '12 at 08:29 PM