Files
RaindropViewer/Assets/Raindrop/Bootstrap/RaindropLoader.cs
T
alexiscatnipandalexiscatnip 827ecfea77 refactor: fix issue #10
- add StabilityTest.cs: test app is stable across startup and teardowns within the UnityTestRunner environment
- add RaindropLoader.cs: provides UnityTests a easy API to 'startup' the game and 'teardown' the game.
- the above code changes caused regressions (NRE) in UIBootstrapper.cs, UIService, and some camera thingy so I changed them.

I feel like I am just mixing the spaghetti in a pot, and the only way to know it is done is to check if the tests are passing better. lol.
2022-08-06 02:43:06 +08:00

24 lines
720 B
C#

using UnityEngine.SceneManagement;
namespace Raindrop.Bootstrap
{
// call these methods to load the game.
public static class RaindropLoader
{
public static void Load()
{
SceneManager.LoadScene(
"Raindrop/Bootstrap/BootstrapScene",
LoadSceneMode.Single);
}
public static void Unload()
{
// calling with LoadSceneMode.Single will call Destroy() on
// RaindropBootstrapper, causing a cascade of teardown,
// similar to what happens in the actual device
var emptyScene = "Scenes/empty";
SceneManager.LoadScene(emptyScene, LoadSceneMode.Single);
}
}
}