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

[Official]New UI System.... coming in Unity 4.6

Discussion in 'General Discussion' started by Tim-C, May 28, 2014.

  1. strontium5

    strontium5

    Joined:
    Apr 16, 2012
    Posts:
    1
    Will there be API support for navigating the UI with the keyboard for the purposes of increased usability?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    I think the first video they posted described the keyboard navigation - basically, every UI element has links to "up", "down", "left", and "right" elements (for when that key is pressed) and these can be automatically generated but can also be customized. They did not mention API access to this.
     
  3. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    766
    How does one get into the beta test program?
     
  4. senritsu

    senritsu

    Joined:
    Dec 12, 2012
    Posts:
    37
    That is great ! A way better solution than i had hoped for :)

    As the new GUI heavily makes use of non-sealed and transparent classes, giving users really powerful tools to extend what is already available, is that the direction Unity in general is steering in? A bit more transparency, and the ability to replicate built-in behaviours would really help for some of the non-GUI related parts as well.
     
  5. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Thanks for your answer Tim.

    Adding a better line support is an important feature expecially for non-game applications.
    Please, can you think about this for the near future? :)
     
    The-Spaniard likes this.
  6. KristianDoyle

    KristianDoyle

    Joined:
    Feb 3, 2009
    Posts:
    63
    I like how the rich text markup is being maintained as basis for text in uGUI.
    It's very versatile - arbitrary nesting of markup - a nice set of features.

    I'm not sure if it's a bug - but the only thing I found was being unable to change font sizes through the stream. Meaning .. you can set font size - once, but changing the size later in the text stream not supported.

    A little standalone (or in unity editor) visual rich text editor I feel would be a pretty cool thing for someone to come up with given that unity rich text is probably going to be used by a lot of people.
     
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    Currently there is a limitation in the UI system that a CanvasRenderer generates one batch with one material. There are reasons for this (such as changing material within the same rect area would force a break in batching) and some technical reasons (which can be coded around with time). So in the current state quad and material are not supported. We have improved text rendering on the roadmap for the future.

    Of course :) It works quite nicely. You can either have elements 'automatically' know where to navigate to (we figure out the most correct to move to when you press a button), or explicitly specify where to move to on press.

    Most things in the UI system are non sealed and very extendable. This ranges from the event system code through to the UI framework. Some elements are not like the CanvasRenderer and the Canvas, but this is because they live in core Unity and not in the Unity UI dlls.

    We'll be improving support for 'vectors' in general at some stage. No ETA though as there are a lot of things we have on our roadmap that may be higher priority.

    Text markup seems to work multiple times in a stream here for me :)

    Sure would, but all development takes time and right now we are prioritizing the core of the UI system :(
     
    Rodolfo-Rubens likes this.
  8. IntDev

    IntDev

    Joined:
    Jan 14, 2013
    Posts:
    152
    I'm being tempted to write some games entirely on this UI system. Bad practice?
     
  9. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    Well, it's probably a bad practice to commit to exclusively using a system you've never used before ;)

    But I could see this system being used that way, especially for puzzle games.
     
  10. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    It's been done internally. It's not super designed for it, but it can be done.
     
  11. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    It sounds like Unity does lots of game prototyping internally, but never shows any of it? Why is that?
     
  12. KristianDoyle

    KristianDoyle

    Joined:
    Feb 3, 2009
    Posts:
    63
    Ok the problem I remember is not with multiple markups. The problem is with line spacing. Font size markup results in over-sized line spacing.

    upload_2014-7-3_11-53-6.png
     

    Attached Files:

  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Because it's prototyping? I don't show of a lot of stuff I do for learning or exploration either.
     
    inafield likes this.
  14. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Neither do I but I make games to sell, they don't. It's more just about the technical side which would be cool to be able to browse through.
     
  15. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    It takes a lot of work to take something from internal to external. Just because they're employed by Unity doesn't mean their code is the embodiment of perfect code. If they provided their prototypes as-is, people would complain undoubtedly and some will learn bad practices.
     
    inafield and madlion like this.
  16. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Absolutely. A prototype is more often than not just a minimal test of an idea, with nothing expected to last any longer than that. By their nature they're typically not suited to public demonstration. There's a good reason that good engineers typically throw away prototype code.
     
    Dabeh likes this.
  17. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    Because marketing would hate to see my amazing programmer art get leaked via official channels :) And has also been said if something is 'released' it has to be supported. That takes a surprising amount of effort.

    Can you raise a bug with this project in it? I'd like to take a closer look. It's possible that the font has a large ascent that is taken into account for line heights. A good test is to use the Å character and the Ç to check line layout.
     
  18. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    This is so unimpressive to me. Such a clunky, tedious and unnecessarily complex system. Who likes this kind of stuff? Assigning animations in one editor, connecting it in another, manually dragging corners and snapping things, then calling everything using straight up strings (terrible for error sensitivity). And anchor points, stretching, padding, margin; why are these things showcased as if they are something impressive and new? I just don't get this new UI. I'm really not looking forward to start working with it. Too bad the new Coherent UI is so terribly expensive.
     
  19. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    244
    @Horp1 - If you are talking about NGUI, I hope you know this new UI is actually based off this UI ( correct me if I'm wrong ). I also don't see what the problem is with this new UI system, it uses all the components that we are used to using on Unity and everything is visual.
    I think you should cut the Unity Developers some slack, because not everything is as easy as some people may think.

    Aside from that, I really can't wait for this!!
     
  20. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    I'm not talking about NGUI. And I don't see the reason to "cut them some slack" since the GUI system has been in the works for so many years by now. We've been looking forward to this UI system for so long now, and what they finally ended up with is what has less than what I consider the bare minimum of what a UI system should be capable of. Still relying on the (not so rich) Rich Text and not having concepts such as inline elements and floating built in is just strange. These things have been part of standard UI design for more than 10 years.
     
  21. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Then roll out your own GUI system with what you want it to contain there Horp1.
    Unity has rewritten the GUI system many times trying to incorporate what users like from the current GUI assets. I personally like what they have done. But to each their own I guess.
     
  22. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    Ok, so if you buy a product, say Microsoft Office, and in their new update they add a new function that you think is way worse than it should be, a good suggestion to you would be to "write your own text editor"?
    And I would at least have a good option to "Roll out my new system" if I source access, which I don't. I'm not saying they owe me a better system than this, or something like that. I'm just expressing my opinion, that what they have shown so far is very unimpressive to me, since it can barely do what other UI systems could do many, many years ago, and not even that.

    What suprises me the most is how they showcase this new UI, and how people are reacting.
    If they showed of the graphical capabilities of Unity 5 by doing a video that showcases "per pixel lighting" and "bump mapping" you would probably feel how I feel now; like you've stepped into a time machine back to 2002 and wonder why everyone around you seem so impressed.
     
  23. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    I don't think so. They've been part of web UI design for a while, but not games UI. The majority of games UI doesn't need to flow arbitrary text into unpredictable frame sizes...
     
  24. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The complexity regarding a UI is usually to integrate it as good as possible into an environment like Unity. That is by far more complex than adding some features to the Rich Text implementation. What matters a lot for the first version is to have an outstanding integration into Unity. That's what they are showing in the videos and that's what their goal seems to be.
     
  25. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Ok now this is just being silly here.
    They have it so you can add on/expand the system. Again don't like it and doesn't fit your needs then modify it or use another program.
    And since you want to go there, Microsoft listens to customers and adds feature people want, don't like it then use an earlier version that doesn't have the change. Hmm sounds like Unity and the changes they are doing with the GUI. This includes most if not all the GUI packages out there and how they go about doing things.
     
  26. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    Unity doesn't show off anything anymore. By comparison, every few livestreams from Epic have had stuff that is just "here's a thing we played around with" in them. A prototype doesn't need to be super complete or even released. If the concept is easy enough to convey and interesting, you can just post a short video explaining the concepts and rough implementation and leave it at that.
     
  27. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    This keeps getting weirder.
    It sounds like you're saying the old system is fine? I thought the new system would be way more capable than this; and I don't want to go back to the old system because it is even worse. It sounds like whatever they added would have satisfied you, which I don't get.
     
  28. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    244
    @Horp1 I'm not denying the fact that you should express your opinion, I just feel that there is a lot of "complainers" in this world and nothing is ever "good enough". If it's taking so long to build this new GUI system there must have been a reason as to why it took so long.
    What other GUI system are you talking about by the way ? I'm curious to know as I'm using NGUI to build my UI.

    What exactly are you looking for in a GUI system ? what features do you want ? It may be a better idea to suggest these ideas to the Unity Dev's rather than simply saying "This sucks".

    I think the reason why everyone is impressed is because everyone has been waiting to finally have a decent GUI system come with Unity rather than relying on spending some extra cash to get a GUI system.

    Everyone is entitled to their opinion, and I don't mean to start an argument :).
     
    Rodolfo-Rubens likes this.
  29. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    I, on the other hand, think there are too many "accepters". Ok, that's not a word, but I'm referring to people that seems to be satisfied with whatever they get.

    I've been quite clear in what I'm looking for in a UI. I think the best way to do UI for a great number of reasons is markup code. A good markup based UI with the ability to create things via scripts (like you can in javascript with HTML), with a stylesheet-system was what I expected from this new UI. Especially with HTML5 being a new platform; the potential for synergy there is great.
     
  30. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    People's voice:
    http://feedback.unity3d.com/forums/unity/suggestions?utf8=✓&status=&category=&view=most_voted
     
  31. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584


    I think this describes a very specific use case - "I want to make web-like pages in Unity" and doesn't make sense to me for game design.

    The major issues I have are all game-based UI concerns. World-space UI, alignment issues for various devices and orientations, performance, draw calls, animated elements, callbacks, etc.

    I think it would make things really complex to be forced into HTML5/jQuery/javascript for that kind of thing. You would be asking people to become familiar with the Unity way of doing things, and in addition the HTML5/javascript way of doing things. There are certainly not clear standards on designing with HTML5, so sounds like a development nightmare.
     
  32. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    We are not acceptors. It is far more important to have a good basis than any fancy functionality in the first version. For third party developers, it is almost impossible to make such a solid basis that is tightly integrated, but it is absolutely possible to build on a solid basis and make fancy extensions to get something that is more powerful.

    HTML5 is going to be a new platform for Unity, that is right, but there are absolutely no synergies because of that. You can bring something to HTML5, not the other way around. Those are from a technical point of view two completely different pairs of shoes.
     
    Rodolfo-Rubens likes this.
  33. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    244
    Actually that is a brilliant idea!



    The guys over 3DBuzz developed something like this on the old system. Head on over to their site ( it's not free :( ) to see what you can dig up, at least this proves it is possible.
    I do actually think having a stylesheet similar to what you have on web pages is a very good idea.

    However I do not think this is really Unity's problem, more like the developers problem :). But because 3DBuzz made one, you can probably make one :).
     
  34. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    This is a good point: The only reason HTML/CSS approaches work in browsers is because the browsers already have a inbuilt understanding of how to make a button, how to make a text frame, how to display an image, how to make a list box, and so on. Right now Unity doesn't even have that at the moment (at least, not in a performant way), so even if the new GUI system did support some kind of HTML/CSS style workflow, they'd have to have done the vast majority of the work that they've done anyway.
     
    StarManta likes this.
  35. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    Please try keep in mind that we don't all work with games, where the GUI is fixed regarding content and layout.
    Unity is used all kinds of companies and for all kinds of reasons.

    And it's not always a fact that a sprite-based GUI is the perfect solution for all cases, no matter how many anchors it sports :p.

    I hope that Unity listens to all suggestions regarding better and more dynamic handling of Rich Text, markup and so on.
    Despite what some people say, there are other reasons why these suggestions are being made besides users being grumpy.

    As it is now, implementing a procedural GUI for a really dynamic non-game application takes a lot more time than all other parts of the application combined. Not to mention that it leaves the user with a cluttered hierarchy of GUI-elements and/or prefabs. Prefabs, which of course do not support proper nesting either (as has been mentioned multiple times again and again).

    Even if multiple 3rd party addons exist that allow markup by html, css and xaml and to separate GUI elements from the scene hierarchy, none of them work on all platforms.

    Implementing support for vector-graphics in various forms besides the usual sprites-and-spritesheet would be a big step for really dynamic GUI:s.
     
    aiab_animech likes this.
  36. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    I think the new uGUI has tremendous power that reflects the years of creative thinking and hard work it has taken. At the same time, I agree with Horp1 that the animation system is a hulking behemoth that is clunky, disjoint, and overly complex. Most of the steps demonstrated in this video look like a nightmare to develop with, and I hope, as they move toward final release, that they can hide most of the complexity of animation controllers, parameters, transition triggers, and toggling loop setting so that I can focus on creating amazing UI's.

    I'm conflicted with polar emotions, at once both awesomely excited and hesitantly cringing.

    Gigi
     
  37. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The new GUI in its current form hasn't taken years; they started over at least once (not called DNFGUI for nothing!). That's not to say it hasn't had quite a lot of development effort put into it. As for using markup code, OnGUI already basically does that if you use GUILayout, and people don't generally want to use it for game GUIs.

    --Eric
     
  38. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    @Eric5h5: The reason why people don't want to use it is because it's slow. Besides that it has a lot to offer for dynamic GUI:s.
     
  39. aiab_animech

    aiab_animech

    Joined:
    Jul 4, 2012
    Posts:
    177
    OnGUI is a non-option, and you know this. Even the most basic UI:s will eat up all the performance on mobile devices, even the newer ones. Apart from that I think it's good. I mean the Unity editor itself is done using that system, and it's a very competent application imo.

    This is kind of a reply to Aedous as well; the Buzz3D thing is also using OnGUI, which effectively makes it totally unusable.

    Maybe this new system can be extended with a great markup system, but these sprite based UI:s usually aren't well suited for that at all. Developing something like that will take a great effort; and it would be way easier to do something like that if you had actual source access, and could build such a system from the ground up; not try to squeeze it into this new sprite based system. And that's what I thought the Unity team would have done this time around. Not just give us a new version of NGUI with a bit world space GUI stuff and some custom inspectors added. Personally I don't get this world space GUI thing at all; really think that's a bad way to design UI:s even for games. Really none of well-liked and successful games out there make extensive use of world space UI, if they even use it at all. For the small uses it has, I think quads/meshes with custom shaders do just fine. This goes back to my previous point about how strangely I think the way this new GUI system is showcased to us. A focus on the clunky animation system, world space UI (which once again, I think is a great example of bad design used 'just cause you can'), and in several videos show anchoring, padding, centering and margins, as if that is even something to show. Is it even possible to imagine a system which doesn't have those features?
     
  40. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Yes we get it, you don't like it. You don't understand why it is like that, I love it that it is not HTML based. With the current solution for uGUI, it is possible to create an HTML plugin yourself, the other way around would have been almost impossible.
     
  41. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,117
    I think this new UI System will be just fine for 90% of the games made with Unity, probably much better and convenient than a HTML based one.
     
  42. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Have you actually tested this, or are you just repeating what some other people say even though it's not actually true? Because I have an app that makes heavy use of OnGUI and it hits 60fps no problem on an iPod touch 5, with room for plenty more. It's definitely an option, and while I don't care to use it for most game GUIs, it works fine for certain cases. It's frankly ludicrous to claim that it's "totally unusable". The speed could be problematic back in the iPhone 1 days when it was written in C#, but now it's C++ and more importantly, mobile CPUs are far faster. But it's apparently hard to get people to stop repeating stuff that used to be true 7 years ago since it's "common knowledge".

    Quite a few games use world-space UI elements.

    --Eric
     
  43. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Yeah, live streaming would be different. I was speaking in the context of stuff being released.
     
  44. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Sure, but I for one would prefer that we get an excellent foundation that a) we can extend to fit our varied specific needs and b) Unity can add to over time than something that' more capable now but harder to expand later, or something that takes longer to get into our hands because they're trying to make it everything for everyone right out of the gate.

    Call me an "accepter" if you want, but I'm much more productive (and happy!) when I'm take what I've got for what it is and plan and execute accordingly. Feedback is useful, but neither complaining nor gushing is particularly productive for anyone.
     
  45. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    Certainly, but you surely recognize that like 90% of the projects that use Unity are games? If there's some solution which would be absolutely perfect for everyone then that'd be great, but in the absence of that I think it's reasonable of them to cater to the 90% case in the first version and worry about the 10% after that, y'know? It sucks for you if you're in that 10% that you have to wait a bit longer for something that solves all your problems but hopefully you can see that some foundations are being laid.

    Yes, I'd quite like to see SVG import support at some point (importing as a mesh, not a texture, so it can be scaled smoothly). FWIW, adding an 'SVG Graphic' component to the new UI system would be very easy for an end user; the hard part is tesselating the vectors into mesh.
     
  46. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Maybe just some insight on how these prototypes went then? I think there would be lots of valuable insight on interesting ways to use Unity by the people who made it.
     
  47. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    I agreee with you, especially about SVG. I could whip something together to get a homebrew GUI that suited me, or I could use Coherent or Noesis (which I do, both. + Daikon Forge). There's plenty of solutions out there.
    But I don't like the current situation where there's a lot of fragmentation.

    I'm thinking long term. If there's one thing that I've learned the last years it's that you should never rely too much on a 3rd party to cater to your needs. One day down the road they usually abandon their products, that's at least true when it comes to products in the Asset Store.

    Not to mention that if UGUI contains enough stuff that most people will use it without 3rd party assets, that would also mean that we wouldn't see as many assets in the store that requires framework X or Y to work. So, less fragmentation by implementing more functionality into the core instead of by 3rd parties is my main concern.
     
  48. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    @Horp1 :
    I not sure how you was hoping for a markup language like HTML5 within a game development software. HTML+CSS is not very creative friendly, and only an experienced dev can get a bit fancy with it. Then any game or creative visual apps for browser will not use HTML5, instead they rely on other soft like flash (yes yes its not all dead) or other JS framework such as CreateJS, PaperJS, .... (too many to list).
    Markup language is good for software interface (MXML+css for example) or any common website, forms, etc...

    Unity is still built around the idea of creating games which require a UI system that allow any sort of creativity.

    As someone said before, Unity can't satisfy everyone, but you shouldn't have any reason to believe they would release a UI based on HTML5, that would have been a terrible choice....
     
  49. AkhmedAbasov

    AkhmedAbasov

    Joined:
    Mar 13, 2014
    Posts:
    163
    How to use a long press of a button? Previously, I used repeatbutton. I tried to understand, but nothing happened.
     
  50. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    It seems to have worked out pretty well for http://coherent-labs.com/ Played with their demo in unreal and it was very nice, they also have a Unity offering.