Question by 
               BasementK · Mar 15, 2019 at 05:26 PM · 
                animationvideotexturepause menu  
              
 
              pause video texture and animation in pause menu
Hello guys, I'm creating a planetarium for mobile devices and have a problem with my pause menu... I've created a Sphere and flipped it that I can play a video as texture with light animations inside it. My problem is, that every time I go into the pause menu, the video and light animations are still playing. did anyone have a clue why it doesn't work?
My C# for the pause menu:
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement;
public class PauseMenu : MonoBehaviour {
 public static bool GameIsPaused = false;
 public GameObject pauseMenuUI;
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape) &&GameIsPaused)
     {
         if (GameIsPaused)
         {
             Resume();
         } 
         else
         {
             Pause();
         }
     }
 }
 public void Resume ()
 {
     pauseMenuUI.SetActive(false);
     Time.timeScale = 1;
     GameIsPaused = false;
 }
 public void Pause ()
 {
     pauseMenuUI.SetActive(true);
     Time.timeScale = 0;
     GameIsPaused = true;
 }
 public void RestartGame()
 {
     Debug.Log("Restart Video...");
     SceneManager.LoadScene("Rosetta_FullDome");
 }
 public void QuitGame()
 {
     Debug.Log("Quitting Game...");
     Application.Quit();
 }
 
               }
               Comment
              
 
               
              Your answer