Search Unity

IMGUI vs UIElements PropertyField minimum label width

Discussion in 'UI Toolkit' started by V0odo0, Dec 17, 2020.

  1. V0odo0

    V0odo0

    Joined:
    Jan 8, 2012
    Posts:
    328
    I have custom EditorWindow that should draw two serialized properties.



    First one is drawn as ObjectField as expected. Second one has a custom PropertyDrawer that just creates IMGUIContainer Inside CreatePropertyGUI.



    As you can see they have a different minimum label width.


    By default, the UIElements PropertyField minimum label width is 135 while EditorGUIUtility.labelWidth is 150. I can change it manually via CSS style but I think they should be synced.
     
    oscarAbraham likes this.
  2. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Hi, is there any resolve about mix use of IMGUI and property field with the same label width?