Search Unity

Unity 4.6 with new GUI system to be released this spring!?

Discussion in 'General Discussion' started by im, Mar 18, 2014.

  1. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I don't like NGUI. It creates a mess of components in the hierarchy for making a simple button. I hope the new GUI will be completelly integrated and less complex.
     
    Last edited: Mar 23, 2014
  2. popc

    popc

    Joined:
    Nov 13, 2013
    Posts:
    12
    Hey this thread is funny.
     
  3. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    Can't belive that S*** ! You ppl are really excited because they are changing the GUI !? I mean, what tha...... What is so exciting about it? That you have to learn using Unity again? Come on.... -_-
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,135
    So I take it you've never used the current Unity GUI? I take it you've never had your draw calls skyrocket because of how terrible it is? I take it you've never actually tried to make a UI with its exceptionally clunky code implementation?
     
  5. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Well, well. It's about time!
     
  6. s7ent

    s7ent

    Joined:
    Sep 20, 2012
    Posts:
    28
    Does anyone know if the immediate mode GUI will be deprecated? If not, will it be able to take advantage of at least some of new features in the new GUI?
     
  7. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    767
    It should be deprecated, shot, burned at the stake, blown up, and thrown in a volcano in Mordor where it came from.

    But I would be surprised if they remove it, it would break a lot of existing games.
     
  8. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    So you won't like the new GUI also. It does just the same.
    Each GUI element is an object on hierarchy.
     
    Last edited: Mar 24, 2014
  9. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    767
    While the base concepts are the same, it does reduce the complexity quite a bit.

    For example, lets say you want to make a button.

    In NGUI, you needed a parent game object, then 2 game objects inside one for the background and one for the text. You need several components such as UIButtonScale, UIAnchor, UIButtonSound, UIButtonColor, BoxCollider, UIButtonMessage, and some additional component if you want navigation with a controller. In the inside objects you need UILabel and UISprite.

    In the new GUI, you need 2 objects, the parent, containing a UIButton and a UISprite, and a child containing a UILabel, that is it. It is functionally equivalent. If you want other animations, the gap is even bigger.

    NGUI focuses on making small reusable components, which is fine, but you end up with a huge amount of components and game objects. The new GUI focuses on being easy to use, and make the common case as simple as possible, while allowing you to do more complex stuff.

    Suppose you want to do something when the button is clicked.

    In NGUI, you open the UIButtonMessage, put in a target object and type the name of the message. You cannot have several objects listening to the button event click, and you would have to know what the name of the method you want to call is. Also, it is not type safe.
    In the new GUI, you drag in an object you want to call, it figures out what components and methods are available, and you just select which one you want to call. You can have as many listeners as you want. It is just much simpler.
     
  10. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    NGUI does have that same functionality now; you can drag an object and it will give you a drop down of matching methods on each component, and you can have multiple listeners. I'm guessing a lot of the newer stuff in NGUI is straight from the new Unity GUI.
     
  11. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    767
    Ohh, that is good to know. We have not upgraded NGUI because it is a big effort and we would rather wait for the new GUI and switch to that.
     
  12. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The entire editor is built on that, so of course it won't be deprecated. It's perfectly good for some things.

    --Eric
     
  13. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Indeed, it's FANTASTIC for building custom inspectors (in an environment which performance isn't crucial) :)
     
  14. Alan47

    Alan47

    Joined:
    Mar 5, 2011
    Posts:
    163
    I can clearly see why it won't be deprecated anytime soon. But let's be honest about this one: it isn't particularly good for anything. As an Rhich Client Platform user interface (which is required by the editor), it can't match things like GEF (yes, I know that is Java, not Mono/.NET but you get the idea). As a Game UI framework, well... I think we all know why it did not get much love there, either.

    So what is it good for, then? :confused:


    UI toolkits are always a difficult matter. So far, in quite a lot of years in active development, I've seen only ONE combination of tools that makes UI remotely acceptable: Java + Swing + Eclipse's Window Builder Pro + MigLayout. And that's for desktop applications. Things get even MORE complex when it comes to games, because in addition to be functional, they are required to look good and moreover *unique*. You can't get away with a standard skin in a real game. For that reason... I don't see any *real* solution to the problem of Game UI any time soon, because it is a theoretical as well as a practical problem. I'm ready to be convinced otherwise by the new UI system, though :)
     
    Last edited: Mar 30, 2014
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Come on, there are plenty of use cases where it's handy.

    Off the top of my head, simple custom editors are a snap to whip up and it's great to be able to add OnGUI() { // stuff } to an arbitrary MonoBehaviour and easily print debug stuff on the screen. If targeting PC as a platform there's some cases where I think using OnGUI could actually be more productive than NGUI, too (though they're not particularly common use cases, and they're not things I do often with Unity).

    It's far from ideal, but that's not the same as not being good for anything.
     
  16. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    767
    I would love to be able to use the new GUI for custom editors, hopefully that will be supported.
     
  17. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Can you explain what the benefit of the new GUI will be for custom editors?

    For games, it will certainly rock because for games, I want fancy stuff with lots of nice looking sprites, fancy fonts, interesting animations and so on and so on. But for custom editors what I really want is a clean look that's consistent with the rest of the Unity editor. And I want to be able to create the GUI directly from code and not have to build a scene just to get those properties changed.
     
  18. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    767
    I like having the scene view for making my 3d game. I would hate it if I had to do everything in code

    I like having the animation editor, I would _really_ hate it if I had to do the curves by code.

    I like having the animator view, I would hate it if I had to do a FSM by code.

    I hate having to do my GUI by code. I would rather do it in a visual editor just like the new GUI provides.

    But addressing the custom editors specifically, I have had lots of problem laying out stuff in custom editors. Things for me often end up out of screen and impossible to reach.

    Moreover, I really dislike the API. It is not object oriented, so it feels out of place in C# and Unity's rather nice component model. It forces you to mix presentation with logic. The methods require tons of parameters which make them really verbose for simple things. It is very limited, it lacks widgets like tabs and links and they are not trivial to add. Out of the dozen or so GUI APIs I have used in my life, it is my least favorite one after win32.

    But I hope this does not turn into some flame war, this is just my opinion, I would use the new GUI if it was available for custom editors _and_ was easy to use. If you like IMGUI, more power to you.
     
    Last edited: Mar 31, 2014
  19. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    You won't be able to use the new GUI for custom editors or other editor GUI.
     
  20. Blaveloper

    Blaveloper

    Joined:
    Nov 22, 2012
    Posts:
    46
    Wait.
    If there is a 4.6, where are 4.4 and 4.5?
     
  21. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    4.4 was released (for people doing console publishing), 4.5 isn't out yet.

    --Eric
     
  22. Blaveloper

    Blaveloper

    Joined:
    Nov 22, 2012
    Posts:
    46
    Actually, all Wii U developers are still stuck at 4.2.
     
  23. WVlad

    WVlad

    Joined:
    Apr 5, 2013
    Posts:
    68
    I'm really disappointed that Unity is not going to provide nice C# events for GUI objects and force object-oriented developers like me to use all their stupid SendMessage stuff...
     
  24. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    Really? Where did you get that information?
     
  25. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am interested too, because I read nowhere that it is going to be based on SendMessage. It was announced to have another event like solution!
     
    Last edited: Apr 16, 2014
  26. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,653
    Yeah it's not SendMessage-based. (You can of course use SendMessage if you really want to, but there's a solution much more like events/delegates available).
     
  27. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
  28. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
  29. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Not sure how you came to that conclusion.

    --Eric
     
  30. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Oh, I've read one too many thread in Unity Gossip is all.
     
  31. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    I hope they'll also announce the new prefab system!!!
     
  32. WVlad

    WVlad

    Joined:
    Apr 5, 2013
    Posts:
    68
    Really? You subscribe to events through inspector. This is their "new event system". No delegates :cry:
     
  33. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,653
    There's a lot more to it than that ;)

    It's not plain old native C# events/delegates, but it's much closer to them than it is to SendMessage.
     
  34. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I dont think you do, if you did u would clearly know 4.5 is being prepared and in beta testing.
     
  35. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    unity 4.6 is in beta 7, testing over 4.5?
     
    Last edited: Apr 24, 2014
  36. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Being prepared for what? RC release or general release? You're right I do think and I've known 4.5 is in beta for a very long time now.
     
  37. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    I hope it's a generic event system that's available for general purpose use. I don't like this thing where everyone and their dog has their own favorite event system...
     
  38. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,190
    I have heard about a new GUI, is there any info on what it will be like?
     
  39. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    As it is based on NGUI, it is probably going to be at least comparable NGUI.
     
  40. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I cannot comment, Graham could possible explain..Information was obtained from the Unity 5 thread in Announcements.
     
  41. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    The uGUI is just what you expect of a GUI. simply easy, beautiful, and you can simply create any control with it.
     
  42. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    How do you know this? :)

    BTW, is that the new GUI has a sort of converter to recover the 'old' GUI Skin?
     
    Last edited: Apr 28, 2014
  43. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    beta tester maybe .. ;)
     
  44. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775

    No. The OnGUI system and uGUI are going to be completely different systems, and fundamentally incompatible. You will probably be able to re-use the art assets created for the OnGUI system, but that's about as far as you'll be able to go.
     
  45. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks for the reply.

    @Giyomu
    Hi guy. :cool:
     
  46. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    This needs to hurry up. It's a GUI system, not a space station.
     
  47. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    This needs to hurry up. It's software development, not world peace talks.

    ... I can only imagine a Unity engineer seeing this comment and acting "Oh well, we've been sitting on it doing nothing, I guess we should release it now"... sigh.

    I know.. I fed the troll...
     
  48. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    If I remember correctly, the entire construction time of the ISS was less than the development time of Duke Nukem Forever (to which this GUI system has been explicitly compared). So "space station" may not be the best choice for this comparison ;)
     
  49. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @PolishRenegade if this leads to another stupid discussion, it's clearly going to be your fault!
     
  50. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    I guess I was looking for a fight. It's so darn tempting to pick them sometime... And it's Monday. You should always be allowed to rant on Mondays, by Law ;)

    Guess the meme game:
    - You've been postponing dev. for an unreleased feature for an on-going project? You're doing it wrong.
    - If you trust software development estimates and timelines... You're going to have a bad time.
    - Some feature you want is not out yet... You can't explain that!
    - Developers work faster when people complain about them. FALSE! They are always doing their best.
    - The amount of self-entitled customers... Is too damn high!
    - What if I told you that it will be released when its ready?
    - This thread is bad, and you should feel bad.
     
    Last edited: Apr 28, 2014