Tanoda
SetupGraphicRendererTests.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9#if UNITY_EDITOR
10using System.Collections.Generic;
11using UnityEngine;
12using UnityEditor;
13
14#if LEAP_TESTS
15using Leap.Unity.Testing;
16
17
19
20 public static class SetupGraphicRendererTests {
21 [SetupLeapTests]
22 private static void setupTests() {
23 var scenes = new List<EditorBuildSettingsScene>(EditorBuildSettings.scenes);
24 addScene("ShaderOutputTestScenes/StationaryBakedRendererShaderTestScene", scenes);
25 addScene("ShaderOutputTestScenes/TranslationBakedRendererShaderTestScene", scenes);
26
27 EditorBuildSettings.scenes = scenes.ToArray();
28 }
29
30 private static void addScene(string name, List<EditorBuildSettingsScene> scenes) {
31 var sceneAsset = EditorResources.Load<SceneAsset>(name);
32 if (sceneAsset == null) {
33 Debug.LogWarning("Could not find scene " + name);
34 return;
35 }
36
37 string path = AssetDatabase.GetAssetPath(sceneAsset);
38 scenes.Add(new EditorBuildSettingsScene(path, true));
39 }
40 }
41}
42#endif
43#endif
UnityEngine.Debug Debug
Definition: TanodaServer.cs:19