Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity UI Toolkit support #34

Open
wilg opened this issue Mar 2, 2022 · 2 comments
Open

Unity UI Toolkit support #34

wilg opened this issue Mar 2, 2022 · 2 comments

Comments

@wilg
Copy link

wilg commented Mar 2, 2022

I would love to use it with Unity's DOM-like UI Toolkit. This would be really helpful since game UI is pretty stuck in the stone age.

I was hoping there would be some kind of simple-ish interface I could implement to add support for an arbitrary UI Framework so I could do this. Any advice here?

@VincentH-Net
Copy link
Owner

@wilg wrote:

I would love to use it with Unity's DOM-like UI Toolkit. This would be really helpful since game UI is pretty stuck in the stone age.

Supporting Unity's UI Toolkit is an interesting idea.

Looking at Comparison of UI systems in Unity it seems like UI Toolkit is the way to go forward - especially for 2D UI with data binding.

There might be (future?) possibilities to build AR/VR 2D applications this way as well; UI toolkit allows to have screen space UI elements following world space objects.

It looks like UI Toolkit was designed in the same decades-old approach of an XML dialect UXML for UI markup and another (proper human programming) language for UI logic, creating similar problems for developers as XAML and HTML do, which C# Markup aims to solve.

@VincentH-Net
Copy link
Owner

@wilg wrote:

I was hoping there would be some kind of simple-ish interface I could implement to add support for an arbitrary UI Framework so I could do this. Any advice here?

C# Markup aims to support the full feature set of any .NET UI framework - e.g. even Blazor with it's HTML mixup with C#. This goal precludes defining a least common denominator API for all UI frameworks. The rule is that there are no rules :-)

Instead, C# Markup adds support for each UI framework in codegen logic that encapsulates the specific structure, patterns and conventions of that UI framework (some of which are not formalized / documented or even applied consistently).

I am working towards the state where once a base UI framework is supported, any additional UI libraries that target that UI framework can have their C# markup UI generated automatically - with library author control of the codegen as well.

If there is enough interest I can add support - timing depends on how many devs will want to use it (or when someone wants to hire me in a project that wants to use that)

Atm my advice would be to demonstrate how many devs would want this, or ping me if a suitable project comes along. Hth!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants