using UnityEditor; using UnityEditor.UIElements; using UnityEngine.Perception.Randomization.Scenarios; using UnityEngine.UIElements; namespace UnityEngine.Perception.Randomization.Editor { [CustomEditor(typeof(ScenarioBase), true)] class ScenarioBaseEditor : UnityEditor.Editor { ScenarioBase m_Scenario; SerializedObject m_SerializedObject; VisualElement m_Root; VisualElement m_InspectorPropertiesContainer; VisualElement m_ConstantsContainer; SerializedProperty m_ConstantsProperty; public override VisualElement CreateInspectorGUI() { m_Scenario = (ScenarioBase)target; m_SerializedObject = new SerializedObject(m_Scenario); m_Root = AssetDatabase.LoadAssetAtPath( $"{StaticData.uxmlDir}/ScenarioBaseElement.uxml").CloneTree(); CreatePropertyFields(); CheckIfConstantsExist(); var serializeConstantsButton = m_Root.Query