Skip to content

UIElements in Unity Player rather than in Editor #21

@yuriy-universal-ivanov

Description

@yuriy-universal-ivanov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions