You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When TriInspector is added to the Unity project, CustomPropertyDrawers won't work with UI Toolkit elements, but the UGUI system.
I suspect the behavior is similar to what is explained in this thread: https://discussions.unity.com/t/property-drawers/724398/95
Expected behavior
I'd like to be able to use public override VisualElement CreatePropertyGUI(SerializedProperty property) in my custom propertyDrawers that are not using any TriInspector functionality.
Code Sample
[CustomPropertyDrawer(typeof(WhateverPropertyAttribute))]publicclassWhateverPropertyDrawer:PropertyDrawer{publicoverrideVisualElementCreatePropertyGUI(SerializedPropertyproperty){varcontainer=newVisualElement();container.style.flexDirection=FlexDirection.Row;varpropertyField=newPropertyField(property);propertyField.Bind(property.serializedObject);propertyField.style.flexGrow=1;container.Add(propertyField);// Create buttons and add them to the containerButtonbutton1=newButton(()=>Debug.Log("Button 1 pressed")){text="B1"};Buttonbutton2=newButton(()=>Debug.Log("Button 2 pressed")){text="B2"};Buttonbutton3=newButton(()=>Debug.Log("Button 3 pressed")){text="B3"};container.Add(button1);container.Add(button2);container.Add(button3);returncontainer;}publicoverridevoidOnGUI(Rectposition,SerializedPropertyproperty,GUIContentlabel){EditorGUI.PropertyField(position,property,label);Debug.LogWarning("UI Toolkit not supported, falling back to IMGUI.");}}
Describe the bug
When
TriInspector
is added to the Unity project,CustomPropertyDrawer
s won't work with UI Toolkit elements, but the UGUI system.I suspect the behavior is similar to what is explained in this thread: https://discussions.unity.com/t/property-drawers/724398/95
Expected behavior
I'd like to be able to use
public override VisualElement CreatePropertyGUI(SerializedProperty property)
in my custom propertyDrawers that are not using any TriInspector functionality.Code Sample
Screenshots
Desktop: Win 11
Unity version: Unity 6 LTS
Tri Inspector version: v1.14.1
The text was updated successfully, but these errors were encountered: