Everything work as intended when I am drawing my scriptable object inside an EditorWindow with a VisualTreeAsset, but I don’t know how to listen to changes inside an IMGUIContainer. Or maybe another approach is better, anything will help thank you
{
_levelInspector = new InspectorElement(_selectedLevel)
{
dataSourceType = typeof(Level)
};
rootVisualElement.Add(_levelInspector);
// ...
_levelInspector.Bind(new SerializedObject(_selectedLevel));
_imguiLevelContainer = _levelInspector.Q<IMGUIContainer>();
_imguiLevelContainer.onGUIHandler = () =>
{
EditorGUI.BeginChangeCheck();
{
// how can I draw the inspector of imguiLevelContainer to listen to changes
}
if (EditorGUI.EndChangeCheck())
{
_levelListView.Rebuild();
Debug.Log("Did change");
}
};
}