浏览代码

Performance testing (#85)

* Initial commit of performance tests

* Trying to get performance testing working on yamato

* Trying to get performance testing working on yamato

* Updated tmp test for yamato

* Test tmp yamato performance script

* Test tmp yamato performance script

* Try to report our results from yamato

* Test performance with yamato report results to observer

* Test tmp yamato performance script multiple setups - report results

* Testing hourly test

* testing recurring jobs

* testing recurring trigger

* testing recurring yamato

* Some more advances on performance tests

* Getting rid of some changes

* More fixes so we can get through yamato lint

* More yamato parse fixes

* Changed to nightly tests for perf testing

* Performance tests for perception

* Fix yamato script

* Fix yamato script to only run performance tests

* Added category tag

* Updated changelog

* Fixed test name

* Updated yml to request ...
/main
GitHub 4 年前
当前提交
c3788540
共有 24 个文件被更改,包括 582 次插入0 次删除
  1. 27
      .yamato/environments.yml
  2. 35
      .yamato/upm-ci-full.yml
  3. 4
      com.unity.perception/CHANGELOG.md
  4. 1
      com.unity.perception/Runtime/AssemblyInfo.cs
  5. 83
      .yamato/upm-ci-performance.yml
  6. 8
      TestProjects/PerceptionURP/Assets/StreamingAssets.meta
  7. 8
      com.unity.perception/Tests/Performance.meta
  8. 25
      com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs
  9. 3
      com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs.meta
  10. 24
      com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs
  11. 3
      com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs.meta
  12. 24
      com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs
  13. 3
      com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs.meta
  14. 22
      com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs
  15. 3
      com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs.meta
  16. 22
      com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs
  17. 3
      com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs.meta
  18. 139
      com.unity.perception/Tests/Performance/PerformanceTester.cs
  19. 11
      com.unity.perception/Tests/Performance/PerformanceTester.cs.meta
  20. 101
      com.unity.perception/Tests/Performance/TestHelper.cs
  21. 3
      com.unity.perception/Tests/Performance/TestHelper.cs.meta
  22. 23
      com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef
  23. 7
      com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef.meta

27
.yamato/environments.yml


- version: 2019.4.6f1
# - version: 2020.1.15f1
performance_editors:
- version: 2019.4.6f1
- version: 2020.1.3f1
complete_editors:
- version: 2019.4.6f1
# - version: 2020.1.15f1

image: package-ci/ubuntu:latest
flavor: b1.large
performance_platforms:
- name: win
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
extra-args: --force-d3d11
standalone-platform: StandaloneWindows64
- name: mac
type: Unity::VM::osx
image: package-ci/mac:stable
flavor: m1.mac
extra-args: --force-metal
standalone-platform: StandaloneOSX
- name: ubuntu
type: Unity::VM
image: package-ci/ubuntu:latest
flavor: b1.large
performance_suites:
- name: standalone
display_name: standalone
args: --suite=playmode --platform=
suites:
- name: standalone
display_name: standalone

35
.yamato/upm-ci-full.yml


- .yamato/upm-ci-testprojects.yml#{{project.name}}_linux_editmode_{{editor.version}}
{% endfor %}
{% endfor %}
{% for editor in complete_editors %}
{% for project in projects %}
- .yamato/upm-ci-performance.yml#{{project.name}}_windows_standalone_{{editor.version}}
- .yamato/upm-ci-performance.yml#{{project.name}}_linux_standalone_{{editor.version}}
{% endfor %}
{% endfor %}
all_tests_nightly_perf:
name: Nightly Performance Tests
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.small
commands:
- dir
triggers:
recurring:
- branch: performance_testing
frequency: daily
cancel_old_ci: true
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
{% for editor in performance_editors %}
{% for project in projects %}
- .yamato/upm-ci-performance.yml#{{project.name}}_windows_standalone_{{editor.version}}
- .yamato/upm-ci-performance.yml#{{project.name}}_linux_standalone_{{editor.version}}
{% endfor %}
{% endfor %}

4
com.unity.perception/CHANGELOG.md


Added Randomizers and RandomizerTags
Added support for generating 3D bounding box ground truth data
Added performance test framework
Added nightly performance tests
### Changed
### Deprecated

1
com.unity.perception/Runtime/AssemblyInfo.cs


[assembly: InternalsVisibleTo("Unity.Perception.Runtime.Tests")]
[assembly: InternalsVisibleTo("Unity.Perception.Runtime")]
[assembly: InternalsVisibleTo("Unity.Perception.TestProject")]
[assembly: InternalsVisibleTo("Unity.Perception.Performance.Tests")]

83
.yamato/upm-ci-performance.yml


{% metadata_file .yamato/environments.yml %}
---
{% for editor in complete_editors %}
{% for suite in performance_suites %}
{% for project in projects %}
{{project.name}}_linux_{{suite.name}}_{{editor.version}}:
name : {{project.name}} {{ suite.display_name }} performance tests ({{ editor.version }}, Linux)
agent:
type: Unity::VM::GPU
model: rtx2080
image: cds-ops/ubuntu-18.04-base:latest
flavor: b1.large
variables:
PATH: /root/.local/bin:/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin
commands:
- git submodule update --init --recursive
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade --user
- git clone git@github.cds.internal.unity3d.com:unity/utr.git utr
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
{% if suite.name == "standalone" %}
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}}StandaloneLinux64 --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1
{% else %}
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}} --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1
{% endif %}
artifacts:
logs:
paths:
- "test-results/**/*"
{% endfor %}
{% endfor %}
{% endfor %}
{% for editor in complete_editors %}
{% for suite in performance_suites %}
{% for project in projects %}
{{project.name}}_windows_{{suite.name}}_{{editor.version}}:
name : {{project.name}} {{ suite.display_name }} performance tests ({{ editor.version }}, Windows)
agent:
type: Unity::VM::GPU
model: rtx2080
image: package-ci/win10:stable
flavor: b1.large
commands:
- git submodule update --init --recursive
- git clone git@github.cds.internal.unity3d.com:unity/utr.git utr
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
{% if suite.name == "standalone" %}
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64 --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1
{% else %}
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}} --category="Performance" --report-performance-data --performance-project-id=com.unity.perception --zero-tests-are-ok=1
{% endif %}
artifacts:
logs:
paths:
- "test-results/**/*"
{% endfor %}
{% endfor %}
{% endfor %}
# Not including OSX because the only OSX platform on Bokken with a GPU is a Mac Mini, of which there are only a few and setting up Yamato jobs is very complicated.
# {% for variant in package_variants %}
# {% for editor in complete_editors %}
# code_coverage_win_{{editor.version}}:
# name: Code Coverage Report - Windows
# agent:
# type: Unity::VM
# image: package-ci/win10:stable
# flavor: b1.large
# commands:
# - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
# - upm-ci package test --unity-version {{editor.version}} --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateHtmlReport'
# artifacts:
# logs:
# paths:
# - "upm-ci~/test-results/**/*"
# dependencies:
# - .yamato/upm-ci-full.yml#pack_{{ variant.name }}
# {% endfor %}
# {% endfor %}

8
TestProjects/PerceptionURP/Assets/StreamingAssets.meta


fileFormatVersion: 2
guid: 01c33d1bbfad749909de900dc92115a0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.perception/Tests/Performance.meta


fileFormatVersion: 2
guid: e8af2c3f2ebad4dd69b451a052801fb3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

25
com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs


using NUnit.Framework;
namespace PerformanceTests
{
[TestFixture(640, 480, false, false)]
[TestFixture(640, 480, true, false)]
[TestFixture(640, 480, true, true)]
[TestFixture(1024, 768, false, false)]
[TestFixture(1024, 768, true, false)]
[TestFixture(1024, 768, true, true)]
[TestFixture(1920, 1080, false, false)]
[TestFixture(1920, 1080, true, false)]
[TestFixture(1920, 1080, true, true)]
[Category("Performance")]
public class PerformanceTestAllLabelers : PerformanceTester
{
public PerformanceTestAllLabelers(int resx, int resy, bool capData, bool vizOn)
: base(resx, resy, capData, vizOn,
PerformanceTestBoundingBoxLabeler.Label,
PerformanceTestObjectCountLabeler.Label,
PerformanceTestPixelCountLabeler.Label,
PerformanceTestSemanticSegmentationLabeler.Label
) { }
}
}

3
com.unity.perception/Tests/Performance/PerformanceTestAllLabelers.cs.meta


fileFormatVersion: 2
guid: 24f31177933144a3ba6bfecddb8c7cad
timeCreated: 1601485739

24
com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs


using NUnit.Framework;
using NUnit.Framework.Constraints;
using UnityEngine.UIElements;
namespace PerformanceTests
{
[TestFixture(640, 480, false, false)]
[TestFixture(640, 480, true, false)]
[TestFixture(640, 480, true, true)]
[TestFixture(1024, 768, false, false)]
[TestFixture(1024, 768, true, false)]
[TestFixture(1024, 768, true, true)]
[TestFixture(1920, 1080, false, false)]
[TestFixture(1920, 1080, true, false)]
[TestFixture(1920, 1080, true, true)]
[Category("Performance")]
public class PerformanceTestBoundingBoxLabeler : PerformanceTester
{
public const string Label = "BoundingBoxLabeler";
public PerformanceTestBoundingBoxLabeler(int resx, int resy, bool capData, bool vizOn)
: base(resx, resy, capData, vizOn, Label) { }
}
}

3
com.unity.perception/Tests/Performance/PerformanceTestBoundingBoxLabeler.cs.meta


fileFormatVersion: 2
guid: b559db416e1d40a79648f59a285c7632
timeCreated: 1601485668

24
com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs


using NUnit.Framework;
namespace PerformanceTests
{
[TestFixture(640, 480, false, false)]
[TestFixture(640, 480, true, false)]
[TestFixture(640, 480, true, true)]
[TestFixture(1024, 768, false, false)]
[TestFixture(1024, 768, true, false)]
[TestFixture(1024, 768, true, true)]
[TestFixture(1920, 1080, false, false)]
[TestFixture(1920, 1080, true, false)]
[TestFixture(1920, 1080, true, true)]
[Category("Performance")]
public class PerformanceTestObjectCountLabeler : PerformanceTester
{
public const string Label = "ObjectCountLabeler";
public PerformanceTestObjectCountLabeler(int resx, int resy, bool capData, bool vizOn)
: base(resx, resy, capData, vizOn, Label)
{
}
}
}

3
com.unity.perception/Tests/Performance/PerformanceTestObjectCountLabeler.cs.meta


fileFormatVersion: 2
guid: f15f1494b25a4bf387453aff1ffc54fe
timeCreated: 1601479869

22
com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs


using NUnit.Framework;
namespace PerformanceTests
{
[TestFixture(640, 480, false, false)]
[TestFixture(640, 480, true, false)]
[TestFixture(640, 480, true, true)]
[TestFixture(1024, 768, false, false)]
[TestFixture(1024, 768, true, false)]
[TestFixture(1024, 768, true, true)]
[TestFixture(1920, 1080, false, false)]
[TestFixture(1920, 1080, true, false)]
[TestFixture(1920, 1080, true, true)]
[Category("Performance")]
public class PerformanceTestPixelCountLabeler : PerformanceTester
{
public const string Label = "PixelCountLabeler";
public PerformanceTestPixelCountLabeler(int resx, int resy, bool capData, bool vizOn)
: base(resx, resy, capData, vizOn, Label) { }
}
}

3
com.unity.perception/Tests/Performance/PerformanceTestPixelCountLabeler.cs.meta


fileFormatVersion: 2
guid: f535325a3cb34cbea2057b59b6a0b003
timeCreated: 1601485694

22
com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs


using NUnit.Framework;
namespace PerformanceTests
{
[TestFixture(640, 480, false, false)]
[TestFixture(640, 480, true, false)]
[TestFixture(640, 480, true, true)]
[TestFixture(1024, 768, false, false)]
[TestFixture(1024, 768, true, false)]
[TestFixture(1024, 768, true, true)]
[TestFixture(1920, 1080, false, false)]
[TestFixture(1920, 1080, true, false)]
[TestFixture(1920, 1080, true, true)]
[Category("Performance")]
public class PerformanceTestSemanticSegmentationLabeler : PerformanceTester
{
public const string Label = "SemanticSegmentationLabeler";
public PerformanceTestSemanticSegmentationLabeler(int resx, int resy, bool capData, bool vizOn)
: base(resx, resy, capData, vizOn, Label) { }
}
}

3
com.unity.perception/Tests/Performance/PerformanceTestSemanticSegmentationLabeler.cs.meta


fileFormatVersion: 2
guid: c1f3e7fedce043bd860c715bc7550158
timeCreated: 1601485725

139
com.unity.perception/Tests/Performance/PerformanceTester.cs


using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Unity.PerformanceTesting;
using UnityEngine;
using UnityEngine.Perception.GroundTruth;
using UnityEngine.TestTools;
using UnityEngine.UIElements;
namespace PerformanceTests
{
public abstract class PerformanceTester
{
(int, int) m_Resolution;
bool m_CaptureData;
bool m_VisualizersOn;
PerceptionCamera m_Camera;
GameObject m_SceneRoot;
IdLabelConfig m_IdConfig = null;
SemanticSegmentationLabelConfig m_SsConfig = null;
string[] m_Labelers = null;
List<CameraLabeler> m_ActiveLabelers = null;
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1)
{
this.m_Resolution = (resx, resy);
this.m_CaptureData = capData;
this.m_VisualizersOn = vizOn;
this.m_Labelers = new string[]{ labeler1 };
}
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2)
{
this.m_Resolution = (resx, resy);
this.m_CaptureData = capData;
this.m_VisualizersOn = vizOn;
this.m_Labelers = new string[]{ labeler1, labeler2 };
}
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2, string labeler3)
{
this.m_Resolution = (resx, resy);
this.m_CaptureData = capData;
this.m_VisualizersOn = vizOn;
this.m_Labelers = new string[]{ labeler1, labeler2, labeler3 };
}
public PerformanceTester(int resx ,int resy, bool capData, bool vizOn, string labeler1, string labeler2, string labeler3, string labeler4)
{
this.m_Resolution = (resx, resy);
this.m_CaptureData = capData;
this.m_VisualizersOn = vizOn;
this.m_Labelers = new string[]{ labeler1, labeler2, labeler3, labeler4 };
}
private static CameraLabeler CreateLabeler(string label, IdLabelConfig idConfig, SemanticSegmentationLabelConfig ssConfig)
{
switch (label) {
case PerformanceTestObjectCountLabeler.Label:
return new ObjectCountLabeler(idConfig);
case PerformanceTestBoundingBoxLabeler.Label:
return new BoundingBox2DLabeler(idConfig);
case PerformanceTestPixelCountLabeler.Label:
return new RenderedObjectInfoLabeler(idConfig);
case PerformanceTestSemanticSegmentationLabeler.Label:
return new SemanticSegmentationLabeler(ssConfig);
default:
return null;
}
}
private static List<CameraLabeler> CreateLabelers(IEnumerable<string> labelers, IdLabelConfig idConfig, SemanticSegmentationLabelConfig ssConfig)
{
return labelers.Select(l => CreateLabeler(l, idConfig, ssConfig)).Where(labeler => labeler != null).ToList();
}
[SetUp]
public void SetUpTest()
{
DatasetCapture.ResetSimulation();
Time.timeScale = 1;
if (Directory.Exists(DatasetCapture.OutputDirectory))
Directory.Delete(DatasetCapture.OutputDirectory, true);
Screen.SetResolution(m_Resolution.Item1, m_Resolution.Item2, true);
(m_Camera, m_IdConfig, m_SsConfig, m_SceneRoot) = TestHelper.CreateThreeBlockScene();
m_Camera.enabled = true;
m_Camera.showVisualizations = false;
m_ActiveLabelers = CreateLabelers(m_Labelers, m_IdConfig, m_SsConfig);
foreach (var l in m_ActiveLabelers)
{
m_Camera.AddLabeler(l);
}
if (!m_CaptureData) m_Camera.enabled = false;
if (m_CaptureData && !m_VisualizersOn) m_Camera.showVisualizations = false;
m_Camera.gameObject.SetActive(true);
}
[TearDown]
public void TearDown()
{
Object.DestroyImmediate(m_Camera.gameObject);
Object.DestroyImmediate(m_SceneRoot.gameObject);
var simState = DatasetCapture.SimulationState;
simState.End();
DatasetCapture.ResetSimulation();
Time.timeScale = 1;
if (Directory.Exists(DatasetCapture.OutputDirectory))
Directory.Delete(DatasetCapture.OutputDirectory, true);
m_ActiveLabelers = null;
m_IdConfig = null;
m_SsConfig = null;
}
[UnityTest, Performance]
public IEnumerator ExecuteTest()
{
yield return Measure.Frames()
.WarmupCount(10)
.MeasurementCount(30)
.Run();
// Allow all file writes to complete
yield return new WaitForSeconds(5);
}
}
}

11
com.unity.perception/Tests/Performance/PerformanceTester.cs.meta


fileFormatVersion: 2
guid: 73cdca6d48c834fb3ae5322e62b7c9c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

101
com.unity.perception/Tests/Performance/TestHelper.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Perception.GroundTruth;
namespace PerformanceTests
{
static class TestHelper
{
public static (PerceptionCamera, IdLabelConfig, SemanticSegmentationLabelConfig, GameObject) CreateThreeBlockScene()
{
var labels = new List<string> { "Crate", "Cube", "Box" };
var idConfig = CreateDefaultLabelConfig();
var ssConfig = CreateDefaultSemanticSegmentationLabelConfig();
var camPos = new Vector3(198.0188f, 126.5455f, -267.4195f);
var camRot = Quaternion.Euler(20.834f, -36.337f, 0);
var camScale = new Vector3(36.24997f, 36.24997f, 36.24997f);
var cam = CreatePerceptionCamera(position: camPos, rotation: camRot, scale: camScale);
const float scale = 36.24997f;
const float y = 82.92603f;
var crate = CreateLabeledCube(labels[0], new Vector3(155.9981f, y, -149.9762f), scale: scale);
var cube = CreateLabeledCube(labels[1], new Vector3(92.92311f, y, -136.2012f), scale: scale);
var box = CreateLabeledCube(labels[2], new Vector3(96.1856f, y, -193.8386f), scale: scale);
var root = new GameObject();
crate.transform.parent = root.transform;
cube.transform.parent = root.transform;
box.transform.parent = root.transform;
return (cam, idConfig, ssConfig, root);
}
static IdLabelConfig CreateDefaultLabelConfig(List<string> labels = null)
{
var entries = new List<IdLabelEntry>();
if (labels == null)
{
entries.Add(new IdLabelEntry { id = 1, label = "label" });
}
else
{
var id = 1;
entries.AddRange(labels.Select(l => new IdLabelEntry { id = id++, label = l }));
}
var config = ScriptableObject.CreateInstance<IdLabelConfig>();
config.Init(entries);
return config;
}
static SemanticSegmentationLabelConfig CreateDefaultSemanticSegmentationLabelConfig()
{
var labelConfig = ScriptableObject.CreateInstance<SemanticSegmentationLabelConfig>();
labelConfig.Init(new List<SemanticSegmentationLabelEntry>()
{
new SemanticSegmentationLabelEntry()
{
label = "label",
color = new Color32(0, 0, 255, 255)
}
});
return labelConfig;
}
//public static GameObject CreateLabeledCube(float scale = 10, string label = "label", float x = 0, float y = 0, float z = 0, float roll = 0, float pitch = 0, float yaw = 0)
public static GameObject CreateLabeledCube(string label = "label", Vector3? position = null, Quaternion? rotation = null, float scale = 10)
{
var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.transform.SetPositionAndRotation(position ?? Vector3.zero, rotation ?? Quaternion.identity);
cube.transform.localScale = new Vector3(scale, scale, scale);
var labeling = cube.AddComponent<Labeling>();
labeling.labels.Add(label);
return cube;
}
public static PerceptionCamera CreatePerceptionCamera(Vector3? position = null, Quaternion? rotation = null, Vector3? scale = null)
{
var cameraObject = new GameObject();
cameraObject.SetActive(false);
cameraObject.transform.localPosition = position ?? Vector3.zero;
cameraObject.transform.localRotation = rotation ?? Quaternion.identity;
cameraObject.transform.localScale = scale ?? Vector3.one;
var camera = cameraObject.AddComponent<Camera>();
camera.orthographic = true;
camera.orthographicSize = 1;
var perceptionCamera = cameraObject.AddComponent<PerceptionCamera>();
perceptionCamera.captureRgbImages = false;
return perceptionCamera;
}
}
}

3
com.unity.perception/Tests/Performance/TestHelper.cs.meta


fileFormatVersion: 2
guid: 0a0806dd5ccf43b58adde994734ebfd6
timeCreated: 1600780689

23
com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef


{
"name": "Unity.Perception.Performance.Tests",
"references": [
"Unity.PerformanceTesting",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"Unity.Perception.Runtime",
"Unity.Simulation.Core"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
}

7
com.unity.perception/Tests/Performance/Unity.Perception.Performance.Tests.asmdef.meta


fileFormatVersion: 2
guid: 7b61d417f5df545b6b4cfc327638a440
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存