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

UIElements in Unity Player rather than in Editor #21

Open
yuriy-universal-ivanov opened this issue Aug 5, 2018 · 1 comment
Open

UIElements in Unity Player rather than in Editor #21

yuriy-universal-ivanov opened this issue Aug 5, 2018 · 1 comment

Comments

@yuriy-universal-ivanov
Copy link

yuriy-universal-ivanov commented Aug 5, 2018

Dear Unity team,

I really love the direction you're taking with that new UIElements experimental functionality for the editor. I noticed that UIElements.VisualElement belongs to UnityEngine.Experimental namespace (Unity 2018.2.2f1), not UnityEditor.Experimental. So I tried creating an empty VisualElement in my sample script Start method and then building and deploying it to an Android device, and it seems to work: the object is created, no exception is thrown - looks promising so far.

But now I'm kinda stuck: one has to assign a VisualElement to a root in order to make it render and act. It's simple in Unity Editor: there is that GetRootVisualContainer for that purpose, but is there a way to get a root somehow in the Unity Player as well (f.e. using a Canvas object)? Or the root container functionality is not available in the Unity Player at the moment? If so, are there any plans to migrate that functionality to the player too?

Looking forward to hearing from you,
Yuriy

@moelang
Copy link

moelang commented Aug 11, 2018

They were planned for it, but only for Editor at the moment.
https://forum.unity.com/threads/uielements-can-they-be-used-for-in-game-ui.484253/

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