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 ...
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-...
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 ...
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. ...
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 <...
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:
...
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 ...
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.
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
unity × 10ui-toolkit × 10
c# × 3
unity-ui × 3
architecture × 1
rendering × 1
events × 1
editors × 1
efficiency × 1
user-interface × 1
css × 1
callbacks × 1