flex-shrink: 0;
}
.parameter__categorical-option-property-field Label.unity-property-field__label {
display: none;
.parameter__categorical-options-list-button {
align-self: flex-end;
border-width: 0;
{
class CategoricalOptionElement : VisualElement
SerializedProperty m_CategoryProperty;
SerializedProperty m_ProbabilitiesProperty;
internal CategoricalOptionElement(
var optionProperty = m_CategoryProperty.GetArrayElementAtIndex(i);
var option = this.Q<PropertyField>("option");
option.BindProperty(optionProperty);
// Remove the redundant element label to save space
var label = option.Q<Label>();
label.parent.Remove(label);
var probabilityProperty = m_ProbabilitiesProperty.GetArrayElementAtIndex(i);
var probability = this.Q<FloatField>("probability");
var uniformProperty = m_SerializedProperty.FindPropertyRelative("uniform");
uniformToggle.BindProperty(uniformProperty);
if (uniformToggle.value)
listView.AddToClassList("collapsed");
else
listView.RemoveFromClassList("collapsed");
void ToggleUniform()
ToggleUniform();
if (Application.isPlaying)
uniformToggle.SetEnabled(false);
listView.ToggleInClassList("collapsed");
if (!evt.newValue)
return;
var numOptions = optionsProperty.arraySize;