Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GUI tutorial?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Alec, Jan 13, 2009.

  1. Alec

    Alec

    Joined:
    Mar 11, 2008
    Posts:
    1,330
    I find GUI very confusing, are there any tutorials out there?
     
  2. semaphorian

    semaphorian

    Joined:
    Jan 13, 2009
    Posts:
    3
    search in google you will a lot info regarding it.
     
  3. Alec

    Alec

    Joined:
    Mar 11, 2008
    Posts:
    1,330
    not sure what I'm looking for.
     
  4. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    Try the videos from Unite 2007 dealing with the new GUI. The documentation also has a good number of examples in it.

    Barring a few oddities, I rather like it more than an event driven system.
     
  5. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    It actually is an event driven system, it's just a much better designed one than the old event driven system ;)

    Try adding Debug.Log(Event.current.ToString()); into an OnGUI(). You'll get layout events, repaint events, mousedown events, etc... they're events. Learning how to use them to your advantage makes your GUI-jutsu that much more powerful.
     
  6. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Im still in favor of keeping the old gui system around- I understand its faster on the iPhone too..So maybe the iPhone developers want to keep it about too?

    Any rethink at UT HQ about dumping this?

    I just find OnMouseDown() so straightforward.

    /2c
    AC
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It's faster on "real" computers as well, but they're fast enough that you usually don't notice the difference. And yes, the old GUI system is highly useful in many cases, iPhone or no iPhone, and should not be dumped IMO.

    --Eric
     
  8. potan

    potan

    Joined:
    Nov 2, 2008
    Posts:
    177
    maybe there should be a LITE version of UnityGUI for Iphone, so we can still use it without any noticable performance cost :wink:

    i actually like the way new UnityGUI handle all the input :p, but i heard that using UnityGUI is quite expensive (especially on Iphone, even with useGUILayout = false)

    Edit:
    Alec, i use this tutorial for UnityGUI, it's quite easy to understand for me:

    http://unity3d.com/support/documentation/Components/GUI Scripting Guide.html
     
  9. Alec

    Alec

    Joined:
    Mar 11, 2008
    Posts:
    1,330
    thanks Potan!
     
  10. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Not in the least, no. The plan going forward is to continue developing the Unity GUI system, including new features, optimizations and other improvements.