浏览代码

Now property initializing enum field with default value

/main
Steven Leal 4 年前
当前提交
1f94eb56
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1
      com.unity.perception/Editor/Randomization/ParameterElement.cs
  2. 2
      com.unity.perception/Runtime/Randomization/Parameters/ParameterTarget.cs

1
com.unity.perception/Editor/Randomization/ParameterElement.cs


ToggleTargetContainer();
var frequencyField = this.Q<EnumField>("application-frequency");
frequencyField.Init(ParameterApplicationFrequency.OnIterationSetup);
m_ApplicationFrequency = m_Target.FindPropertyRelative("applicationFrequency");
frequencyField.BindProperty(m_ApplicationFrequency);

2
com.unity.perception/Runtime/Randomization/Parameters/ParameterTarget.cs


{
[SerializeField] internal GameObject gameObject;
[SerializeField] internal Component component;
[SerializeField] internal string propertyName = "";
[SerializeField] internal string propertyName = string.Empty;
[SerializeField] internal FieldOrProperty fieldOrProperty = FieldOrProperty.Field;
[SerializeField] internal ParameterApplicationFrequency applicationFrequency = ParameterApplicationFrequency.OnIterationSetup;

正在加载...
取消
保存