コード例 #1
0
 void Awake()
 {
     modalPanelsystem            = ModalPanelSystem.Instance();
     modalPanelLanguageSelection = ModalPanelLanguageSelection.Instance();
     modalPanelItens             = ModalPanelItens.Instance();
     modalPanelMenu     = ModalPanelMenu.Instance();
     menuSetupLanguages = MenuSetupLanguages.Instance();
 }
コード例 #2
0
    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);
    }