Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question PropertyField does not render fallback Drawers inside of EditorWindow

Discussion in 'UI Toolkit' started by Lost-in-the-Garden, Oct 19, 2022.

  1. Lost-in-the-Garden

    Lost-in-the-Garden

    Joined:
    Nov 18, 2015
    Posts:
    176
    Hello!

    It seems like the PropertyField when used in an EditorWindow can't render fallback Drawers when no PropertyDrawer is implemented, which it does when used in an Inspector. Is there something I can do?

    EditorWindow:
    Code (CSharp):
    1. var myProp = myObject.FindPropertyRelative("myProp");
    2. myPropField.bindingPath = myProp.propertyPath;
    3. myPropField.Bind(myProp.serializedObject);
    Thanks!
     
    Last edited: Oct 19, 2022
  2. Lost-in-the-Garden

    Lost-in-the-Garden

    Joined:
    Nov 18, 2015
    Posts:
    176
    I've got it working.

    I changed a lot of code so I am not 100% sure what changed. But I had a [HideInInspector] Attribute on a higher up object which seems to have interfered with that.