浏览代码

test fix and bugfix

/0.9.0.preview.1_staging
Mohsen Kamalzadeh 3 年前
当前提交
b26858f4
共有 2 个文件被更改,包括 30 次插入5 次删除
  1. 4
      com.unity.perception/Editor/Randomization/Utilities/UIElementsEditorUtilities.cs
  2. 31
      com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/Resources/SampleScenarioConfiguration.json

4
com.unity.perception/Editor/Randomization/Utilities/UIElementsEditorUtilities.cs


return null;
var attributes = originalField.GetCustomAttributes(true).ToList();
var tooltipAttribute = attributes.Find(att => att.GetType() == typeof(TooltipAttribute));
var tooltipAttribute = attributes.Find(att => att is TooltipAttribute);
var hideInspectorAttribute = attributes.Find(att => att.GetType() == typeof(TooltipAttribute));
var hideInspectorAttribute = attributes.Find(att => att is HideInInspector);
if (hideInspectorAttribute != null)
propertyField.style.display = DisplayStyle.None;

31
com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/Resources/SampleScenarioConfiguration.json


"description": "",
"imageLink": ""
},
"state": {
"enabled": true,
"canBeSwitchedByUser": true
},
"items": {
"rotation": {
"param": {

},
"uniform": {
"min": 0.0,
"max": 360.0
"max": 360.0,
"minAllowed": 0.0,
"maxAllowed": 0.0,
"shouldCheckValidRange": false
}
}
},

},
"uniform": {
"min": 0.0,
"max": 360.0
"max": 360.0,
"minAllowed": 0.0,
"maxAllowed": 0.0,
"shouldCheckValidRange": false
}
}
},

},
"uniform": {
"min": 0.0,
"max": 360.0
"max": 360.0,
"minAllowed": 0.0,
"maxAllowed": 0.0,
"shouldCheckValidRange": false
}
}
},
"enabledStateCanBeSwitchedByUser": {
"scalar": {
"metadata": {
"name": "",
"description": "",
"imageLink": ""
},
"value": {
"bool": true
}
}
}

正在加载...
取消
保存