void Awake() { gameOver = ModalPanelControl.Instance(); watchVideo = ModalPanelAskForWatchVideo.Instance(); UnityAdsButton.AdsOnComplet = false; wasAskedToWatch = false; }
public static ModalPanelControl Instance() { if (!modalPanel) { modalPanel = FindObjectOfType(typeof(ModalPanelControl)) as ModalPanelControl; if (!modalPanel) // Make sure that Modalpanel existes. { Debug.Log("There needs to be one active ModalPanelControl Script on a GameObject in your scene"); } } return(modalPanel); }