mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-29 19:03:10 +00:00
- 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.
24 lines
720 B
C#
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);
|
|
}
|
|
}
|
|
} |