浏览代码

Fixed parameter element editor

Now allows 'Add Folder' to append on already present elements
/main
Steven Borkman 4 年前
当前提交
a548758c
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 2
      com.unity.perception/CHANGELOG.md
  2. 9
      com.unity.perception/Editor/Randomization/VisualElements/Parameter/ParameterElement.cs

2
com.unity.perception/CHANGELOG.md


Fixed ground truth not properly produced when there are other disabled PerceptionCameras present. Note: this does not yet add support for multiple enabled PerceptionCameras.
Fixed an issue preventing a user from adding more parameters to a parameter list with the 'Add Folder' button. 'Add Folder' now appends the contents of the new folder on the list instead of replacing its contents.
## [0.7.0-preview.2] - 2021-02-08
### Upgrade Notes

9
com.unity.perception/Editor/Randomization/VisualElements/Parameter/ParameterElement.cs


if (folderPath == string.Empty)
return;
var categories = LoadAssetsFromFolder(folderPath, categoricalParameter.sampleType);
var probabilityIndex = probabilitiesProperty.arraySize;
var optionsIndex = optionsProperty.arraySize;
var optionProperty = optionsProperty.GetArrayElementAtIndex(i);
var probabilityProperty = probabilitiesProperty.GetArrayElementAtIndex(i);
var optionProperty = optionsProperty.GetArrayElementAtIndex(optionsIndex + i);
var probabilityProperty = probabilitiesProperty.GetArrayElementAtIndex(probabilityIndex + i);
optionProperty.objectReferenceValue = categories[i];
probabilityProperty.floatValue = uniformProbability;
}

正在加载...
取消
保存