TextField, TemplateContainer and Animations

Hello,

I am very excited to learn and (potentially) apply UI Toolkit to an upcoming project. Have been experimenting with it for a few days now and really like the direction it is moving in. That being said, there are a few things I would appreciate help with:

  • Seemingly I am unable to write into TextField at runtime, only delete from it. Is it just me?
  • Is there a plan to support TextField placeholder in the near future (or perhaps it’s hidden somewhere)?
  • When I make use of UIDocument to attach the UXML to the page, it auto adds
  • TemplateContainer* as a parent (obviously, as the UXML may have multiple elements at its root ), which is cool. The issue was that the TemplateContainer doesn’t “grow”, so I had to write a query that finds it and resolves that manually. Is that the “normal” way of doing it?
  • Any rough ETA for animations? What I actually need is pretty basic: To get UIDocuments move in and out of the screen. Any way to achieve that with current functionality?

Note: I am using UI Toolkit version 1.0.0-preview.3 on Unity 2020.1.0b15

Cheers,
Sahin

  1. You need to add the “Default.uss” stylesheet file in the PanelSettings in order for textfield to work properly
  2. +1
  3. There are some animations allready there like this example:
panel.experimental.animation.Start(from: 0, to: 100, durationMs: 1000, (p, value) => { p.style.left = value; }).easingCurve = Easing.InOutCubic;

I do have a USS file assigned to Panel Settings (which was created by myself). That being said, no idea where to get the “Default.uss”, as I don’t have it in my project.

Thanks, will give it a try.

Alternatively you could probably position absolutely and modify width/height and transform but it is gonna be very costly. Really curious how can we control layers and batching, with modern CSS/HTML5 it is fairly understood task.

Altho, seeing that animation snippet example I guess it is gonna be done per-panel. Which can kinda suck if you make responsive UI in flex because new panel will render new object and it wont participate in layout/flex,