void OnSwipe(SwipeModule.Direction Dir) { // Debug.Log("Swipe detected: " + Dir); switch (Dir) { case SwipeModule.Direction.Up: { LastScene = Scenes[Index]; SceneManager.UnloadSceneAsync(LastScene); Index = ++Index % Scenes.Length; CurrentScene = Scenes[Index]; SceneManager.LoadScene(CurrentScene, LoadSceneMode.Additive); } break; case SwipeModule.Direction.Down: { LastScene = Scenes[Index]; SceneManager.UnloadSceneAsync(LastScene); Index = (Index + Scenes.Length - 1) % Scenes.Length; CurrentScene = Scenes[Index]; SceneManager.LoadScene(CurrentScene, LoadSceneMode.Additive); } break; } }
void OnSwipe(SwipeModule.Direction Dir) { // Debug.Log("Swipe detected: " + Dir); switch (Dir) { case SwipeModule.Direction.Right: { Index = ++Index % Mats.Length; Plane.material = Mats[Index]; } break; case SwipeModule.Direction.Left: { Index = (Index + Mats.Length - 1) % Mats.Length; Plane.material = Mats[Index]; } break; } }