浏览代码

PR Feedback. (#5173)

/check-for-ModelOverriders
GitHub 4 年前
当前提交
efb4e1ff
共有 2 个文件被更改,包括 1 次插入22 次删除
  1. 14
      .yamato/com.unity.ml-agents-test.yml
  2. 9
      com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent2D.cs

14
.yamato/com.unity.ml-agents-test.yml


{% metadata_file .yamato/coverage_tests.metafile %}
test_editors:
- version: 2019.4
enableCodeCoverage: !!bool true
enableCodeCoverage: !!bool true
enableCodeCoverage: !!bool true
testProject: DevProject
enableNoDefaultPackages: !!bool true

enableCodeCoverage: !!bool false
testProject: DevProject
test_platforms:

{% for editor in trunk_editor %}
{% for platform in test_platforms %}
{% if editor.enableCodeCoverage %}
{% capture coverageOptions %} --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+{{ package.assembly }}'{% endcapture %}
{% else %}
{% assign coverageOptions = "" %}
{% endif %}
test_{{ package.name }}_{{ platform.name }}_trunk:
name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
agent:

- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u trunk -c editor --wait --fast
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} --package-filter {{ package.name }} {{ coverageOptions }} --extra-create-project-arg="-upmNoDefaultPackages" --extra-utr-arg "reruncount=2"
{% if editor.enableCodeCoverage %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ package.minCoveragePct }}
{% endif %}
- upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} --package-filter {{ package.name }} --extra-create-project-arg="-upmNoDefaultPackages" --extra-utr-arg "reruncount=2"
artifacts:
logs:
paths:

9
com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent2D.cs


[AddComponentMenu("ML Agents/Ray Perception Sensor 2D", (int)MenuGroup.Sensors)]
public class RayPerceptionSensorComponent2D : RayPerceptionSensorComponentBase
{
/// <summary>
/// Initializes the raycast sensor component.
/// </summary>
public RayPerceptionSensorComponent2D()
{
// Set to the 2D defaults (just in case they ever diverge).
RayLayerMask = -5;
}
/// <inheritdoc/>
public override RayPerceptionCastType GetCastType()
{

正在加载...
取消
保存