Search Unity

The PropertyDrawer can not reference a uxml by reference.

Discussion in 'UI Toolkit' started by watsonsong, Oct 11, 2021.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    From the document 'Create a Custom Inspector', there has a great way to reference a VisualTreeAsset by reference without hard code the asset path.


    It work in Editor and EditorWindow. But it not work in a PropertyDrawer. It could be good if support it.
     
    Deleted User, Pholith and marcospgp like this.
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    PropertyDrawer is not a MonoScript type, this is only supported for MonoScript types. This is Unity itself, not UI Toolkit. There's nothing we can do about it, sadly!
     
  3. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    I would also like to see this! Was trying to follow the getting started with UI Toolkit guide in the Unity documentation and got stuck in this part.

    @JuliaP_Unity whom could we ask about making this change to PropertyDrawer? It's not like you guys aren't in the same company :) that person has to exist!
     
    Gasimo likes this.
  4. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    @marcospgp you can submit feedback through the Help > Report a Bug tool, or by submitting feedback on the Unity Roadmap :)

    There you can read about all upcoming changes as well.

    For this type of request, the "Editor" roadmap is probably the most appropriate.

    This is the type of thing that has a lot more value coming from users than coming from us, internally ;)
     
    marcospgp likes this.