Skip to main content
3 votes

Unity UI toolkit button callbacks don't work if I disable the UI document and then enable it again

You are setting the callbacks in Awake instead of setting them in OnEnable. As you can see in the lifecycle, Awake is not called ...
Zibelas's user avatar
  • 5,012
3 votes

Do editor scripts impact game performance?

Editor scripts and custom editor windows using UIToolkit do not affect game or engine performance after the build. They are enclosed within #if UNITY_EDITOR directives, compiled into separate editor-...
Amir's user avatar
  • 31
2 votes

How can I override the footer buttons in Unity's UI Toolkit ListView?

As suggested by DMGregory, using itemsAdded resulted in a workable solution. After creating a new "UI Toolkit > UI Document" in a scene, and adding the ...
TheWolfNL's user avatar
  • 163
2 votes
Accepted

UI Toolkit px size different from the game view

The UIDocument component where you load your inventoryUI.uxml has a PanelSetting field. ...
Freyr Magnússon's user avatar
2 votes

Is it possible to keep a prefab of a UI element with UI Toolkit?

Got it. While UXML (XML in general really) does not qualify as a prefab or typical asset, a utility exists to load such a file as one. Suppose our file is called "PathLabel", and is in a <...
Michael Macha's user avatar
1 vote
Accepted

How to get value of transitionDuration in C# for Unity UI Toolkit

By chance, I discovered that I am able to get the value of transitionDuration using this code: ...
Mfa Xyz's user avatar
  • 11
1 vote

How can I override the footer buttons in Unity's UI Toolkit ListView?

You do that by replacing the method stored in the delegate makeItem of the listview with your own method that returns the new ...
Philipp's user avatar
  • 123k
1 vote

How can I right-align elements in Unity's UI Toolkit scroll view?

Have you tried putting the image you want to align within a visual element? And then using that as a container to set the alignment on. I'm still new to UIToolKit but I think this should work.
Fay Oxby's user avatar
1 vote

How can I right-align elements in Unity's UI Toolkit scroll view?

Evidently, after some investigation on the Unity Forums, this is pretty much impossible right now. I would have to use the old Unity UI system to have that much control. There may be a way to do it, ...
Michael Macha's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible