您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
799 B

using UnityEngine;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace UnityEngine.Experimental.Perception.Randomization.Editor
{
class FloatRangeElement : VisualElement
{
public FloatRangeElement(SerializedProperty property)
{
var template = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>($"{StaticData.uxmlDir}/FloatRangeElement.uxml");
template.CloneTree(this);
var minimumField = this.Q<FloatField>("minimum");
minimumField.bindingPath = property.propertyPath + ".minimum";
var maximumField = this.Q<FloatField>("maximum");
maximumField.bindingPath = property.propertyPath + ".maximum";
this.Bind(property.serializedObject);
}
}
}