|
|
|
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.Collections; |
|
|
|
using UnityEngine.Perception; |
|
|
|
using UnityEngine.Perception.Sensors; |
|
|
|
using UnityEngine.Perception.GroundTruth; |
|
|
|
using UnityEngine.SceneManagement; |
|
|
|
using UnityEngine.TestTools; |
|
|
|
|
|
|
|
namespace EditorTests |
|
|
|
|
|
|
[UnityTest] |
|
|
|
public IEnumerator EditorPause_DoesNotLogErrors() |
|
|
|
{ |
|
|
|
int sceneCount = EditorSceneManager.sceneCount; |
|
|
|
int sceneCount = SceneManager.sceneCount; |
|
|
|
EditorSceneManager.CloseScene(EditorSceneManager.GetSceneAt(i), true); |
|
|
|
EditorSceneManager.CloseScene(SceneManager.GetSceneAt(i), true); |
|
|
|
} |
|
|
|
|
|
|
|
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); |
|
|
|
|
|
|
yield return new ExitPlayMode(); |
|
|
|
} |
|
|
|
|
|
|
|
static GameObject SetupCamera(LabelingConfiguration labelingConfiguration) |
|
|
|
static void SetupCamera(LabelingConfiguration labelingConfiguration) |
|
|
|
{ |
|
|
|
var cameraObject = new GameObject(); |
|
|
|
cameraObject.SetActive(false); |
|
|
|
|
|
|
perceptionCamera.produceObjectCountAnnotations = true; |
|
|
|
|
|
|
|
cameraObject.SetActive(true); |
|
|
|
return cameraObject; |
|
|
|
} |
|
|
|
} |
|
|
|
} |