public static ModalPanelMakeChoice Instance() { if (!modalPanel) { modalPanel = FindObjectOfType(typeof(ModalPanelMakeChoice)) as ModalPanelMakeChoice; if (!modalPanel) // Make sure that Modalpanel existes. { Debug.Log("There needs to be one active ModalPanelMakeChoice Script on a GameObject in your scene"); } } return(modalPanel); }
void Start() { gameObject.GetComponent <AudioController> ().PlayBackground(); gameSetupL = GameSetupLanguages.Instance(); makeChoicePanel = ModalPanelMakeChoice.Instance(); }