Skip to content

Commit 030c038

Browse files
committed
update tests due to simulation capture package update
1 parent 644fe9b commit 030c038

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

TestProjects/PerceptionURP/Assets/Tests/Editor/PerceptionCameraEditorUrpTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public IEnumerator MissingRendererFeature_ProducesLogError()
4141
var gameObject = new GameObject();
4242
gameObject.SetActive(false);
4343
gameObject.AddComponent<Camera>();
44+
gameObject.AddComponent<UniversalAdditionalCameraData>();
45+
4446
var perceptionCamera = gameObject.AddComponent<PerceptionCamera>();
4547
gameObject.SetActive(true);
4648
LogAssert.Expect(LogType.Error, "GroundTruthRendererFeature must be present on the ScriptableRenderer associated with the camera. The ScriptableRenderer can be accessed through Edit -> Project Settings... -> Graphics -> Scriptable Render Pipeline Settings -> Renderer List.");
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"MonoBehaviour": {
3+
"Version": 3,
4+
"EnableBurstCompilation": true,
5+
"EnableOptimisations": true,
6+
"EnableSafetyChecks": false,
7+
"EnableDebugInAllBuilds": false,
8+
"UsePlatformSDKLinker": false,
9+
"CpuMinTargetX32": 0,
10+
"CpuMaxTargetX32": 0,
11+
"CpuMinTargetX64": 0,
12+
"CpuMaxTargetX64": 0,
13+
"CpuTargetsX64": 72
14+
}
15+
}

com.unity.perception/Tests/Editor/PerceptionCameraEditorTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using Moq;
1313
using Moq.Protected;
1414
using UnityEngine.Rendering;
15-
1615
#endif
1716

1817
namespace EditorTests
@@ -205,8 +204,11 @@ static GameObject SetupCamera(Action<PerceptionCamera> initPerceptionCameraCallb
205204
var camera = cameraObject.AddComponent<Camera>();
206205
camera.orthographic = true;
207206
camera.orthographicSize = 1;
207+
208208
#if HDRP_PRESENT
209209
cameraObject.AddComponent<UnityEngine.Rendering.HighDefinition.HDAdditionalCameraData>();
210+
#elif URP_PRESENT
211+
cameraObject.AddComponent<UnityEngine.Rendering.Universal.UniversalAdditionalCameraData>();
210212
#endif
211213

212214
var perceptionCamera = cameraObject.AddComponent<PerceptionCamera>();

0 commit comments

Comments
 (0)