using UnityEngine; using UnityEngine.Perception.Randomization.Scenarios; using UnityEngine.UIElements; using Object = UnityEngine.Object; namespace UnityEditor.Perception.Randomization { [CustomEditor(typeof(ScenarioBase), true)] class ScenarioBaseEditor : Editor { VisualElement m_ConstantsListVisualContainer; bool m_HasConstantsField; VisualElement m_InspectorPropertiesContainer; VisualElement m_RandomizerListPlaceholder; VisualElement m_Root; ScenarioBase m_Scenario; SerializedObject m_SerializedObject; public override VisualElement CreateInspectorGUI() { m_Scenario = (ScenarioBase)target; m_SerializedObject = new SerializedObject(m_Scenario); m_Root = AssetDatabase.LoadAssetAtPath( $"{StaticData.uxmlDir}/ScenarioBaseElement.uxml").CloneTree(); m_RandomizerListPlaceholder = m_Root.Q("randomizer-list-placeholder"); CreatePropertyFields(); CheckIfConstantsExist(); var serializeConstantsButton = m_Root.Q