using System; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; namespace UnityEditor.Perception.Randomization { class CategoricalOptionElement : VisualElement { SerializedProperty m_CategoryProperty; int m_Index; SerializedProperty m_ProbabilitiesProperty; internal CategoricalOptionElement( SerializedProperty categoryProperty, SerializedProperty probabilitiesProperty) { m_CategoryProperty = categoryProperty; m_ProbabilitiesProperty = probabilitiesProperty; } // Called from categorical parameter public void BindProperties(int i) { // Reset this categorical item's UI Clear(); var template = AssetDatabase.LoadAssetAtPath( $"{StaticData.uxmlDir}/Parameter/CategoricalOptionElement.uxml"); template.CloneTree(this); m_Index = i; var indexLabel = this.Q