void Awake() { modalPanelsystem = ModalPanelSystem.Instance(); modalPanelLanguageSelection = ModalPanelLanguageSelection.Instance(); modalPanelItens = ModalPanelItens.Instance(); modalPanelMenu = ModalPanelMenu.Instance(); menuSetupLanguages = MenuSetupLanguages.Instance(); }
public static ModalPanelSystem Instance() { if (!modalPanel) { modalPanel = FindObjectOfType(typeof(ModalPanelSystem)) as ModalPanelSystem; if (!modalPanel) // Make sure that Modalpanel existes. { Debug.Log("There needs to be one active ModalPanel Script on a GameObject in your scene"); } } return(modalPanel); }