Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

UI Roadmap

Discussion in 'UI Toolkit' started by benoitd_unity, Aug 27, 2019.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    675
    This is true for tools, but it's not true for museum exhibits, brand experiences, trade show stuff, AV presentations, ... These must work, never break, or you're out of business :). Not much room for error and bugs there.

    That being said, "We will do our best to help you" sounds much better than "we don't want to be held accountable if it doesn't work", thanks.

    I also agree with Peter that nowadays every UI is moving all the time, but I think there's a middleground here between "changing entirely" and "animating what's already there" that I hope animation support for UIToolkit will find at some point. Note that I hope it will not just be CSS animations as that is far more limited (and far too limited) for any complex usecase. If we wanted to create simple HTML+CSS based UIs we'd be in web development, not interactive experiences.
     
    Peter77 likes this.
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    The majority of work on UI, most of which is done on the CPU, is computing the layout of the UI and assigning shared styles to the correct elements. This is an expansive recursive operation. This is the part that we're optimizing with the assumption that your layout (which also means hierarchy) will not constantly change. Scrolling lists don't change their hierarchy. They mostly just translate/move elements around which can be done very efficiently.

    What you're talking about in terms of effects and particles, they are not layout-bound and should be done in shaders (on the GPU) for the most part. This part of the UI will just use the same, optimized and configurable, graphics pipeline that the rest of Unity uses. All UI Toolkit will do for you is put the button in the right place on screen and help you assign the correct style to it. How that button renders is up to you and your shaders*.

    * Right now, UI Toolkit does all the rendering itself with a custom internal shader. We are working on allowing you to use your own shaders.
     
    DonLoquacious, babaqalex and Peter77 like this.
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    I was specifically just talking about tools, not museum exhibits, trade shows, etc. :) But since we're on this thought experiment, what is more important:
    1. A tool works well with no bugs, never breaks, but will actively not allow you to use it any other way than how it was intended to be used.
    2. A tool works well with no bugs, never breaks, but only when used as designed. If used outside of what it was designed for, the tool will work but without support or guarantees - which means, it might break on you.

    We will start with CSS animations and transitions as those are more common in UI than complex - multi-screen animations. Think mouse hover/click effects. But at a later date, we will also add hooks into the UI system so you can control it using the same animation tools already present in Unity, like Timeline. In the end, both options will be available.
     
    DonLoquacious likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,232
    Do these also include things like "show screen", so that we can have nice transitions of UI elements when a screen is shown or hidden?
     
  5. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    Seems doable with CSS transitions, yes.
     
    Peter77 likes this.
  6. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    72
    Do you guys have plans for a Modal Window (with API maybe?), Tabbed Panels system and support for transition between scenes?
     
  7. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    We might have something post-release but no explicit plan for this right now. However, it should be easy to implement something on your own that works for you.
     
    Jrimmmmmrz likes this.
  8. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
    I believe @uDamian already provided some great answers. And no, my comment was not going beyond UI Toolkit, it was addressing UI specific scenarios. It is built for making game and application UI, such as menus and HUD elements, and for making Unity editor extensions. We'll invest heavily at making sure that the use cases that falls into those categories perform well.

    We're not stopping you for doing anything else, and we'll monitor those other scenarios and see if we can better support them. But for now, we want to manage expectations by clarifying what we're focusing on.
     
    DonLoquacious and fherbst like this.
  9. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
    Yes it is considered a common scenario. But in what you're describing, it's not the entire UI that changes every frame. I doubt you'll have a list that is being scroll, while being resized, with particles being projected from each button in the list.

    Lists are virtualized for example, so you can have 3000 animated buttons in it but it's only going to instantiate/render a handful of them. There's also optimization strategies that are part of the UI renderer to handle other kinds of use cases.
     
    DonLoquacious and Jrimmmmmrz like this.
  10. WeBee3D

    WeBee3D

    Joined:
    Oct 30, 2012
    Posts:
    21
    Hello, I am having trouble finding a solution for rendering particles in the Screen Space - Overlay canvas. Are you aware of this being added to a future roadmap or a specific recommended solution for Unity 2019.2 or newer?

    I'm looking for an official word, rather than a user-created workaround.

    Thank you.
     
  11. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    381
    Justo to make sure, are you referring to the UIElements panel Renderer o the UGUI canvas component?

    If it's about UIElements, there's no official support for runtime yet. If it's about UGUI, you should try asking I'm the corresponding forum.
     
    uDamian likes this.
  12. fssdev

    fssdev

    Joined:
    Jan 16, 2017
    Posts:
    50
    Sorry if this was asked already, but is it a fair assumption this is multi-platform (iOS, Android)?
     
  13. Jrimmmmmrz

    Jrimmmmmrz

    Joined:
    Nov 19, 2016
    Posts:
    4
    UI elements is amazing , thanks UNITY:)
     
  14. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    220
    Can we use a custom shader to draw UI elements?
    With uniforms and instancing, of course...
     
  15. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    Yes, UI Toolkit should support all platforms that Unity supports.

    Not yet, but this feature is planned for the medium term.
     
    rsodre likes this.
  16. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    Lists are virtualized?
    Do you specifically mean that ListView is virtualized?
     
  17. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    51
    What does "virtualization" mean in this contex?
     
  18. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    264
    I think a virtualized ListView is:
    If only 10 Elements of 3000 are visible, only 10 elements will generated. If you scroll and an element leave the view, this element will be reuse.

    Angular CDK has also an virtual scroll https://material.angular.io/cdk/scrolling/overview Maybe that can explain it better.
     
    Thaina likes this.
  19. unity_4-cpGPp_cAIdrA

    unity_4-cpGPp_cAIdrA

    Joined:
    Apr 9, 2020
    Posts:
    2
    I am seeing the UI Builder but not the renderer for it, isn't available yet?
     
  20. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
    Yes you're right, I meant the ListView.
    Pretty much what runner78 is referring to, recycling ListView items as you scroll, so you can display huge lists without worrying about performance.
     
  21. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    381
    @benoitd_unity Do you need/want bug reports about runtime at this time? I have found some and can send them if they're of any use.
     
    Peter77 likes this.
  22. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
    Hi and thanks for offering to help. I think it's a bit too soon for reporting issues but we'd be very interested at knowing more about workflow issues and technical limitations in the existing iteration. Not necessarily feature requests such as animation or 3D UI, but with the current set of features, what are the main hurdles of building and integrating UI in your project.
     
    DonLoquacious and JoNax97 like this.
  23. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    381
    Cool! I'm very interested in this tech and would love to help. I hope to make a post today about my demo project for UI Toolkit, and I can add issues/hurdles/etc there. Is that fine or would you prefer another channel for that?
     
  24. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    @benoitd_unity As far as work flow issues, I've been trying to make data templating system because I don't like having to touch code for things I don't think I should have to.
    I thought I had it working well, and I did in the context of inspectors, but I recently tried to back-port my system to 2018 for a project I'm working on, and while it appeared to work at first, I found that ouside the context of inspectors my design didn't work.
    This is a pretty round about way of saying, I was doing things totally custom and that lead to problems. I'm hoping you guys will eventually implement a data templating system... but in the meantime, I attempted to do this again following your design behind BindableElement and INotifyValueChanged.

    However, I just couldn't get this to work and cascade to child elements and there may be a very specific reason for it but I can't determine what it is.
    It would be nice to have some examples and explanations on how to use BindableElement and INVC, but I suspect those wouldn't even cover my use case.
    I attempted to solve this by using INVC<object> since I want to be able to present content based upon the type bound. I want to load a UXML Template based upon the types name, but I can't seem to use Template or Instance for this purpose.
    I think the problem I'm running into is the fact that I'm adding elements after a value change, and expecting things to bind in that scenario.
    Basically, having a deep dive explanation on how BindableElement and INVC work so that developers could understand this scenario better would be incredibly helpful.
    Or just adding Data templating to the short list of features :D
     
  25. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    675
    Workflow issues / technical limitations:
    - no Rich Text support, rules it out for us for client projects that usually have and need a backing CMS
    - no support for loading UXML files at runtime (e.g. from disk), same as above, this makes this very hard (if not impossible) to use this with external structured content
     
    Noisecrime likes this.
  26. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    @fherbst you can load UXML files using Resources at run time, and using AssetDatabase at edit time. You can also load the Assets using the AssetBundle class to load them from AssetBundles. I'm not sure about parsing a raw UXML file at run or edit time directly from the disk, but these approaches do work, and its how I'm actually setting up my templating system.
    If you want to see an example of this you can check out my projects, http://www.github.com/PassivePicasso/VisualTemplates
    http://www.github.com/PassivePicasso/VisualTemplatesExamples

    Specifically you can look at this class for how I'm automatically loading UXML templates for an Inspector when a template of a matching name exists.
    https://github.com/PassivePicasso/VisualTemplates/blob/master/Editor/AutoEditor.cs

    Just to clarify, the issue I ran into is that this system I'm using doesn't work for EditorWindows and I don't understand why. The bindings fail to propagate, probably because I'm handling binding wrong, and this issue may be resolved when the new binding system becomes available.

    edit: sorry for the errors in the comments of that code
     
    Last edited: Apr 15, 2020
  27. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    675
    Your project looks interesting, but I'm talking about loading those from disk so that they can be edited outside of Unity, e.g. with content coming from a CMS. That was my original "Yay!" moment when Unity announced working on "something like XML and CSS for UI".
    I think I understand now that it's going more into the direction of pre-made "blocks" (aka similar to Gutenberg blocks in Wordpress) and it's still up to users to invent their own data structures for filling in those blocks.
     
  28. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    952
    Are you explicitly calling
    Bind()
    yourself? The Inspector Window will call this on your custom Inspectors for you but in an EditorWindow, you have to explicitly call
    Bind(SerializedObject)
    , which is a recursive operation so you only need it on some common root element.

    Our importer UnityEditor.UIElements.UXMLImporterImpl has an internal method called
    ImportXmlFromString(string, out VisualTreeAsset)
    which you could reflect and have a pure in-memory UXML string translated to a
    VisualElement
    hierarchy. That said, it's Editor-only and...not public. We do plan to open this up for runtime use but it's not a priority at this time.
     
    JakHussain likes this.
  29. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    627
    Hi

    I have try to use uxml to create editor window and it difficult.
    As I know uxml keep tree that need to be cloned and it works for simple things but when I want to have dynamic lists I need additional uxml for list item and if I have 10 such items types then I end up with 11 uxml and 11 uss files in project just for Single editor window to work. In IMGUI it was just in 1 single no too long method :(

    As I know uxml can have more then 1 tree inside so I with to be able to define all trees first main one and any count of additional ones inside 1 uxml and just clone right one getting it by index or by name from asset.

    Additionally it will be very good to have uss defined inside uxml as sub asset and additional I want to be able to define tag <style></style> and inside it define css unique for this uxml, Like I can do in web.

    With this setup I can define entire EditorWindow with just 2 assets MyWindow.cs and MyWindow.uxml
    Additional note is add helper method for EditorWindow that will load uxml for window if it has same name as cs file.

    We can make it ourselves but having it as default will be very useful, so no one will load by assets path that can be different for any project :)
     
  30. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    I was calling Bind, but perhaps I'm calling it in the wrong place?
    I tried moving it around a bunch and couldn't get consistent behaviour.
    I'll open a thread for this instead of continuing a conversation here
     
  31. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    51
    I never got around to mentioning it, but thanks for the clarification.
     
  32. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    535
    Why are you making this assumption? It seems like NGUI, UGUI and now UI Toolkit all make this assumption, and every project i work on has changing UI. UI's change so very much, i dont know any project with static UI. UI is very often a large performance drain.

    At the very least, are there ways in which we can change this behaviour and provide a custom way to render UI? For example by attempting to draw every element as an instanced quad. This way the gpu cost of drawing is higher, but there is no CPU cost to rebuild.
     
    Last edited: Apr 29, 2020
    Prodigga, Noisecrime, Yozaro and 3 others like this.
  33. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,180
    ill second that, game uis are meant to be animated, have particle effects etc etc
     
    Prodigga, Thaina, Jes28 and 1 other person like this.
  34. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    438
    Totally agree. This is seriously flawed design decision. We are using game engine, not a web engine. Actually even web today is becoming PWA that being changed and animated constantly or eventually from event driven

    Layout changing is not rare. Such as animation resizing or something like pinterest feed that could move its cells around from update
     
  35. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    264
    Can you give an example where you keep changing the hierarchy of the UI? Even if you change the UI every 2 seconds, on a 60 fps game this has 120 frames without change, 1 frame with a change.

    Usually effects don't change the hierarchy.
     
  36. AliAlbarrak

    AliAlbarrak

    Joined:
    Jan 24, 2018
    Posts:
    9
    I think some people here are understanding this assumption incorrectly. It is actually a common assumption in UI toolkits design.
    Google is making a new UI toolkit for Android from the ground up. In one of their talks about it, they mentioned that this assumption (UI structure doesn't change that often) helped them decide on internal implementation and data structures that improved performance significantly.

     
  37. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    438
    This is the wrong assumption in unity system that hierachy is linked with order of location. Just a ui that could drag object to reorder is changing hierachy order and sometimes changing hierachy itself. I don't think UXML has completely decouple this

    For example, reorderable list such that presented in UnityEvent. Is the order matter? Is the order was also linked with hierachy? Is pressing and dragging any item will change hierachy?
     
  38. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    When they talk about the hierarchy changing often, this basically excludes user initiated changes as those changes are infrequent.
    Lets stop and talk about frequency of changes.
    When a user conducts an action, it will take them a few seconds to cause that action to occur, sure maybe you have a button that changes the hierarchy when you press it, is the user going to be hammering on that button at 60 clicks per second? Its not likely.
    Something like drag and drop is a change to the hierarchy but it ideally causes 2 changes to the hierarchy, spread apart by probably a second or so, maybe a few more if the user is indecisive.

    When they talk about the ui changing frequently, they are talking about situations where you have the hierarchical structure changing every few frames. Perhaps they could be more specific than I about that.
    Now that is separate from things like effects, shaders, render textures, these don't change the hierarchy of elements, they just update a visual representation of that hierarchy.

    Changing the size, shape, styling, even positioning of an element on the screen are likely just fine to update frequently, meaning many times per second.
     
  39. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    535
    It also means hierarchy, but not exclusively. A layout change, similar to the layoutgroups we have right now, are still not optimised for. Potentially changing a label, or the position of an element, will be unoptimised for.

    This current limitation is known to be an issue, i just wonder why its not being addressed in a new system. Or at the very least allow us to more easily rewrite that part of the system.
     
  40. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    438
    @PassivePicasso I just present the dragging as something that obvious. But it always possible to have animation or just stream of update about reordering happen without user input (online game leaderboard, for example, it might have stream of user sending new score)

    Changing shape and styling might not relate to layout hierarchy but size and position could. So the point is, if it was an assumption that it won't be change often, then that's mean unity system will not account for common use case we made in the game UI

    Maybe I have difference perspective of "often" than you and unity team? I think moving around every 5 seconds is already "often" but if you means under 1 second is considered "often" then I agree that it not that often in my usual use case
     
    TJHeuvel-net likes this.
  41. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    Disagree with everything Thaina and TJHeuvel-net have said. Very little of that unsupported functionality sounds "common" to me despite how many times that word's been used- and pushing items into lists, scrolling, and changing tabs (all of the "common" ways of updating UI) all work just fine. I definitely don't want to incur the cost of updating the whole UI layout/hierarchy every frame in my mobile games (where I'm already trying to squeeze the most I can from the system resources), and that really feels like the direction this discussion is being pushed now. Look at IMGUI, it renders every frame exactly how you seem to want, makes no assumptions at all about shape or context, and is easily the worse/least performant UI system I've ever used.

    So for what it's worth, I vote that the Unity devs completely ignore the previous 10 or so posts and just keep on being awesome here. UI Toolkit still has numerous problems, we've had to make "workarounds" about a dozen different times now for functionality it doesn't officially support yet, but not once have I regretted the event-based approach used here, and changing that "assumption" is like cutting off your own legs because you dislike your shoes.
     
    Last edited: May 2, 2020
    SevenSolaris and Astaelan1 like this.
  42. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Not often I get into these discussions but I've been working with VisualElements on a daily basis for the past 6 months or so, most of which is recently working with the alpha UIERuntime support.

    First, I want to say, y'all are just asking for what you already have. If you want rendering every frame, use the IMGUI component and move on. https://docs.unity3d.com/Manual/UIE-IMGUI.html

    The way that the VisualElements work is shaping up to be the best UI system Unity has ever had.

    For those of you who are complaining about the way UIToolkit works you clearly haven't spent enough time working with the prior systems to appreciate what UXML, USS, and codebehind can offer. Within a week of working with UIToolkit I was ready to push my project lockdown to wait for UIToolkit to be in parity with uGUI on a handful of smaller issues that really haven't slowed me down otherwise.

    I even implemented runtime drag'n'drop support last night. Here's the trick to this, VisualElements update any time a variable changes. If you REALLY insist on using UIToolkit the wrong way, then just update a variable and it'll refresh.

    And I circle back, you shouldn't be doing this anyway. Accept that you're doing things wrong, read some docs, and it'll all come into focus.

    Unity, please keep on the direction you are, tune up what you have, and maybe expose a few of the bits that aren't currently available for runtime like DragAndDrop being editor only (but with no reason for it).
     
    PygmyMonkey and DonLoquacious like this.
  43. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    535
    I havent said much at all about what i find a common scenario; so allow me to elaborate. Common scenarios are moving and resizing elements, changing text and other properties such as color or scale. I agree with you that re-organising hierarchy is an uncommon scenario, and that could be potentially expensive. I am not interested at all in drag and drop, i am interested in animating my UI, or updating a label every second.

    These scenarios are not optimised for with UGUI and the like, and incur a lot of layouting and mesh-building cost. This is why the talk i linked earlier, that is made by Unity, discourages you from using Animator or doing pretty much anything dynamic with your UI. It seems like the approach in the new UI Toolkit that is being taken is again a focus on static UI's, assuming we do not change anything and optimise for draw calls. Instead i find my projects usually CPU bound, with time to spare on the GPU. I'd gladly trade in 30 or 40 more draw calls in order to get more CPU time rebuilding meshes back.

    For example; if the UI would be one draw call per element as it is in Doom the GPU cost for drawing would be higher, but the CPU cost for creating a single mesh would be avoided. Embrace dynamic UI's, and employ techniques used by Coherent-Labs (and other modern browsers), such as not redrawing areas that have not changed. What i asked for is for this assumption of UI's not to change to be reconsidered, or alternatively support for a way for us to provide a custom rendering backend.

    IMGUI is slow because its immediate, no information is retained at all. Its still possible to have a retained system that is optimised for dynamic UI. Currently the assumption is that UI doesnt change, and as a result its being baked into a giant mesh. That is easy for the GPU, but hard for the CPU when it does indeed change, even in minor ways.

    I am as much a fan of UIElements as any of you are, using existing solutions (HTML/CSS) to problems is definitely the way forward. UGUI has its issues, and UI Toolkit is a great and well engineered solution. The team at Unity solving this issue is awesome, and they are doing great work. I just feel like the assumption that most UI's are static is wrong, and that has some severe consequences.
     
    Last edited: May 2, 2020
    Noisecrime, SevenSolaris and Thaina like this.
  44. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    438
    I think two of two of above comment is mis the point

    The point is not that UIElement can't do dynamic layout, the point we talk about is, it not accounted and optimized for dynamic layout (it just the other words of "with the assumption that your layout (which also means hierarchy) will not constantly change"), while it could and it should

    IMGUI just not optimized for anything, it just easiest and most flexible UI possible, with the cost of all performance down to the drain, that's why we have better UI system and now we have UIElement, better the betterness

    I just voices that we can do better, UI system should also covering optimization for layout changed too, and if the layout was not changed then that would be normal behaviour

    If we have a list UI that was animated by some item in the list moving around up and down for 3 minutes, did that counted as constantly changed?
     
    TJHeuvel-net likes this.
  45. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    264
    If the layout changes every few frames, you're doing something wrong or using the UI for something other than "UI". If you create dynamic Layouts, that shouldn't happen every few frames. And if it does, I wonder what you are doing?
     
  46. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    70
    To me it sounds there are two groups talking about two different things. One is talking about hierarchy and layout changes (layout = alignment, grids, lists, etc) and the other one is talking about transofrmation changes, for example position, size, and rotation (ie. animations).

    And I think this misunderstanding is caused by Unity devs' use of "static" and "often" while being a bit ambiguous on their meaning. I hope a developer from Unity would come and clear this and get the discussion back on track.
     
    Thaina and TJHeuvel-net like this.
  47. SevenSolaris

    SevenSolaris

    Joined:
    Jan 14, 2019
    Posts:
    20
    I can't think of any use case in which I would need to update the UI constantly like what you all are discussing, but I will say that if you dynamically create a lot of elements all at once, then you're going to get a really severe penalty to your performance. I suspect this is a symptom of the same problem that's being discussed.
     
  48. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    131
    Seems like they got your concerned covered, right?
     
    TJHeuvel-net likes this.
  49. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    438
    OK, the most simple example is dynamic leaderboard. It should be just a list view right?

    And suppose there was 100 players in a room. Playing online simultaneous golf game for example. Each may finish their course around the same time so the finished player will see the list of players in their room updated status, sorted by the least score. The finished player score will not only update label and text score, but also it position in the list, and for visually aesthetics it would also animated (each item in the list will be float and moved to its position when changed)

    I think this is perfectly normal UI in a game, many game just made Leaderboard UI this way. So in this perfectly normal scenario, did it possible and efficient to do in UIElements?

    In other words, Is this counted as changing hierarchy? I think changing order of item in the list view should be considered changing hierarchy. And floating animation might also changing its parent from inside the list to outside temporarily isn't it?

    It not so clear in the assumption there. At least we should know the limit before consider switching UIElements over the current gameobject ui system
     
  50. AliAlbarrak

    AliAlbarrak

    Joined:
    Jan 24, 2018
    Posts:
    9
    Here is your answer, Changing children positions and order is not like changing the entire hierarchy. Changing entire hierarchy is something like screen switch. If you change current screen very often I think that will be a bad user experience.
     
unityunity