Search Unity

Re-orderable dynamic tables

Discussion in 'UI Toolkit' started by JohnHudeski, Oct 15, 2019.

  1. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    Just saw the unite UI Element talk and was pretty excited and scared by it.
    For starters, I have minimal web design knowledge but I keep thinking I can port existing elements and styles over to unity. Is this possible or is this just a new way of doing the things we already did in the past and are we restricted to building from unity base element.
    I ask this because I spent a month working on a dynamic table system that allows sort per column and drag-clicking column headers to reorder, with multiple text links,



    It was a slow system with unity complaining about too many nested layouts
    altogether it is fragile and I haven't been able to come up with an elegant system without generating thousands of game objects (I am making a similar game to this

    )

    I know i sound a bit confused, i just need help rethinking the problem and if I should stick to what I have or switch to UIElements.
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    It is not possible to convert existing uGUI UI GameObjects and components to UIElements, at least not right now. UIElements is indeed an entirely different UI framework.

    The good news is that UIElements is not using GameObjects so the cost of having lots of elements on screen is going to be a lot less. Also, you no longer have to worry about Canvases and Sub-Canvases. You can have hundreds of nested elements and the system will do its best to optimize the UI rendering for you. What you're trying to do should be a lot easier in UIElements.

    I would recommend switching. But it really depends on your timeline.

    If you need something in-game in the next few months, it's a bit too early for UIElements. We're still waiting for Unity 2019.3 to release runtime support.

    If your project is longer term, then it makes more sense to switch sooner. You can build the UI within an EditorWindow and then easily move it to runtime once we have the runtime package public.
     
    JohnHudeski likes this.
  3. Yes, this is what I'm doing. Although it requires some extra plumbing (develop independent background stuff in order to not to put everything on hold, like config and whatnot)
    I just started to play around with the in-editor WYSWYG UI-editor. Oh the workflow-difference worth the wait! Although I'm playing around with this in the 2020.1a.
     
    JohnHudeski likes this.
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Just a note that you can use released Unity 2019.2 for the UI Builder. You don't need to be on the bleeding edge alpha. The beta 2019.3 also works. But let us know if you have any questions or feedback on the UI Builder.
     
    Lurking-Ninja likes this.
  5. I have time, so I'm testing the alpha at the same time. It is not mission critical having the UI done right away, so I'm comfortable to be on the alpha.
     
    uDamian likes this.
  6. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    I never thought of that
     
  7. Yeah, most people thinks one game project = one Unity project. But this is not the case at all. I work with multiple projects for different things and assemble later. This means the "final" project which eventually will produce the build I publish does not have to contain a ton of tools I use during development. (Like my endeavors with Gaia and whatnot)
    From there it is just really one step forward to use different versions of Unity for things (obviously we have to be careful with this, should be reasonable). But I'm planning to take my project to 2020.1 anyways, so eventually it won't be a big problem.