Beispiel #1
0
    public static void ShowOneBtnDialog(Transform trans, string title, string content, DialogHitType type,
                                        DialogController.ConfirmBtnClicked confirmCallback = null)
    {
        if (DialogOneAB == null)
        {
            DialogOneAB = AssetBundleConfig.LoadAssetBundle(DialogOneABPath, neededABDic);
            if (DialogOneAB == null)
            {
                Debug.Log("ShowOneBtnDialog fail, DialogAB is null");
                return;
            }
        }
        Object dialog = DialogOneAB.LoadAllAssets() [0];

        if (dialog != null)
        {
            GameObject obj = Instantiate(dialog) as GameObject;
            obj.transform.SetParent(trans, false);
            DialogController dialogTwo = obj.GetComponent <DialogController> ();
            dialogTwo.InitContent(title, content, type);
            dialogTwo.confirmBtnClicked = confirmCallback;
        }
    }
Beispiel #2
0
 void LoadSkyBox()
 {
     MapController.sktboxMat = AssetBundleConfig.LoadAssetBundle <Material>(s0);
 }