public static TipWindowUI Create(Transform parent, TipWindowType type = TipWindowType.oneButton)
    {
        var window = Instantiate(LoadResources
                                 .Load <TipWindowUI>(UIName.prefab_tipWindow), parent);

        if (type == TipWindowType.oneButton)
        {
            window.twoButton1.gameObject.SetActive(false);
            window.twoButton2.gameObject.SetActive(false);
        }
        else if (type == TipWindowType.twoButton)
        {
            window.oneButton1.gameObject.SetActive(false);
        }

        return(window);
    }
Beispiel #2
0
 private T LoadPrefab <T>(string path) where T : Object
 {
     return(LoadResources.Load <T>(path));
 }