CustomToolbar icon indicating copy to clipboard operation
CustomToolbar copied to clipboard

Incompatible with Unity >=6.3

Open nnra6864 opened this issue 6 months ago • 5 comments

Image

I'll look into this a bit later and make a PR if I figure it out.

nnra6864 avatar Jul 30 '25 21:07 nnra6864

I discovered the same thing on my version of the toolbar. I saw that Unity had renamed the “VisualElement” that allows injection, but even after changing it to the new name, it had no effect. Apparently, the entire pipeline has changed with a dedicated API. I haven't found a way to adapt it yet, but if it helps: https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Toolbars.MainToolbarElementAttribute.html

Alaxxxx avatar Aug 03 '25 12:08 Alaxxxx

So glad you replied. I was quite worried due to this project being inactive and your remake seems like a perfect alternative. As for the toolbar, I only read that you gotta use the attribute now, although I have no clue how to actually do that. Wish you the best of luck implementing it, and do let me know if you figure it out as there are a few other assets needing the same fix!

nnra6864 avatar Aug 03 '25 12:08 nnra6864

No worries! I'm having the same problem and I'm working on it right now, but for the moment I don't have any more help to offer, and I even think it's pointless to try.

I managed to implement new buttons via the new system with the attribute, but the only way to see them is via Window > UI Toolkit > Debugger; visually, nothing appears. I've looked all over the documentation and there's no mention of width or height, so I'm not sure how to proceed.

PS: I also tried the example given in the documentation link, but I had the same problem: it appears in the debugger but nothing visually.

But if I ever find anything, I'll let you know !

Alaxxxx avatar Aug 03 '25 12:08 Alaxxxx

@nnra6864 Find a workaround described in the end here https://github.com/Alaxxxx/CustomToolbar/issues/12 I don't use the new API as it is too restrictive for now, but this workaround works, it is easy to change and don't generate warnings.

Alaxxxx avatar Oct 01 '25 11:10 Alaxxxx

Thanks a lot for letting me know, really great to hear you worked around it!

nnra6864 avatar Oct 01 '25 11:10 nnra6864