Search Unity

Advanced HUD / GUI

Discussion in 'Immediate Mode GUI (IMGUI)' started by Actimel, Sep 27, 2014.

  1. Actimel

    Actimel

    Joined:
    Sep 24, 2014
    Posts:
    2
    Hi,

    I am a bit new to unity but I do have a web developer and flash developer background so C# is nothing new to me and a lot of the concepts are familiar.

    To put it quick and simple, I am trying to learn to create a UI / GUI / HUD which has UI elements which fill up which are circular, arcs and many arc segments of a circle.

    By the videos I've watched on you tube it looks like creating a script which displays a texture in the asset library is easy enough for when I want a complete bar which has no graphical element to it created in photoshop. EG shield and hull bars in EVE, pulsing glow effects (mask possible in unity code?) running behind transparent areas of a PNG UI element etc

    I've done a fair bit of googling and youtube searching and found some interesting stuff but nothing I would consider commercial quality (1 guy using an alpha in a png which has pixel aliasing issues, another using a sprite sheet definition for color change on a bar which could have been done without a sprite sheet or image of it by value 0 to 100 and colour steps in an array or a smooth colour algorithm for colour transition, then there are some creating buttons in unity, so they are in 3D environment and some creating them in code which appear to be in a 2D overlay of some sorts).

    My questions are:
    Q1. Anyone got any advanced GUI/UI/HUD tutorials they know of which are more complex than a simple box (eg EVE and many other AAA games)

    Q2. Anyone know the code or can point me in the right direction for loading a texture from the library in and then drawing dynamically a fill rect/box behind it?

    Q3. Anyone know how to create and animate a circular bar in pure code?

    Q4. Any information on depth handling when generating UI elements via code? How does the display list work? It looks 2D when adding text?

    5. Will Unity 5 have better UI/HUD & vector line capabilities? ETA on release?

    Thanks

    D
     
  2. Actimel

    Actimel

    Joined:
    Sep 24, 2014
    Posts:
    2
    Also is there a way to use vector / svg elements for the UI for easy resolution scaling and is animation possible on these elements?

    It appears I may have to use a sprite sheet for complex UI elements, which is going to be painful for indicators with up to 100 steps of progress. How much cpu / gpu will be used if unity is handling about 50 sprite sheets of 25 to 100 frames for the UI? Will this impact game performance a lot? A little?
     
  3. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    Please, have a look at NoesisGUI (http://u3d.as/55A). I would say that it fits perfectly your needs.