Search Unity

UI Elements at Runtime for Game UI?

Discussion in 'UI Toolkit' started by Claytonious, Nov 2, 2018.

  1. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    903
    Is the plan to offer UI Elements as an option for in-game UI instead of only for editor tooling? If so, what is the roadmap for that and when/how might we be able to start playing with it so we can do some benchmarking, planning, and assessment to decide if we might want to start migrating away from the (painfully slow) uGUI/Canvas stuff in the future?

    Thanks!
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    There is indeed a plan to have UIElements running in-game. We'll have a preview of that sometime in 2019. However, the focus right now (for 2019.1) is running UIE in the Editor only.
     
  3. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    @uDamian Is it the aim that UIElements supersedes the current UI system, e.g. the one on bitbucket? Will that be eventually deprecated in favour of this system, or do they co-exist like OnGUI and UGUI right now.
     
    Last edited: Nov 6, 2018
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Not sure which UI system you're referring to here.

    Eventually, when we're ready and it makes sense, UIElements will indeed replace IMGUI and uGui. But that won't happen for a long time. Until then, UIElements will co-exist with the existing frameworks.
     
    Laicasaane and TJHeuvel-net like this.
  5. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
  6. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Nope, it's got the entire source for uGUI. For example, here's Button.

    Sadly, it's pretty outdated, as it's not been updated since February this year.
     
  8. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    Yes but pretty soon, uGUI will ship as a Core Package with Unity. This means you'll be able to embed it in your project and override if needed.
     
    threeplus, recursive and zyzyx like this.
  9. Danarchy

    Danarchy

    Joined:
    Jul 16, 2013
    Posts:
    2
    Bump? Unity Docs have little to no info about getting started w/ UIElements in runtime... Is there a window object we can get a reference to and treat as 'panel' (or root element)?
     
  10. Danarchy

    Danarchy

    Joined:
    Jul 16, 2013
    Posts:
    2
    Oops; just answered my own question. GameObject > UI > Panel
     
  11. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    See the roadmap .pdf file from this thread: https://forum.unity.com/threads/ui-roadmap.735338/

    An "early preview of using UIElements to create simple UI for games and applications" is planned for 2019.3, with an out-of-preview/verified package being slated for 2020.3. Right now, UIElements are Editor-only for creating Editor windows and custom inspectors.