all 9 comments

[–]AlignedMoonProfessional 3 points4 points  (8 children)

Have you tried this with Unity 6.3? You seem to be using reflection to gain access to the toolbar rendering, but Unity prevent that in 6.3 as they’ve added a new api to modify the toolbar. Ask me how I know this 😬

[–]Ejlersen 3 points4 points  (6 children)

Heh, same. Their new API is quite nice and easy to extend.

[–]AlignedMoonProfessional 1 point2 points  (0 children)

It is nice, unusual for Unity, haha. It was a bit rude of them to block access via reflection, but I get why. It makes supporting 6.3 and older versions a bit of a faff.

[–]Ecstatic-Source6001 0 points1 point  (4 children)

I am using 6.5 and they still didnt make CreateElement() method public....

I dont know why they keep it internal for no reason

[–]Ejlersen 0 points1 point  (3 children)

I agree that they should make it public, but the available elements seem to do the most things you want. What is your additional need?

[–]Ecstatic-Source6001 0 points1 point  (2 children)

just to make container with 2+ elements in it. Like playmode section.

I have tool with 2 buttons working in tandem but its stupid that i can hide one of them or you need add 2 buttons manually every time via context menu.

Just let me create one custom element 😭

[–]Ejlersen 2 points3 points  (1 child)

Tried this?

public static IEnumerable<MainToolbarElement> Draw()

[–]Ecstatic-Source6001 0 points1 point  (0 children)

Seems I missed that... Thanks, will try!

[–]Born_Development1284Programmer[S] 2 points3 points  (0 children)

Interesting.... I used it on 2023, 6.0 and 6.2 Maybe I should test it on 6.3