private void GetAssetBundleUI(Action <AssetBundle> callback) { AssetBundleManager.LoadAsset(_bundleUrlUI, (AssetBundleManager.Asset asset) => { callback.Invoke(asset._assetBundle); }, (AssetBundleManager.Asset asset) => { Debug.LogWarning("GetAssetBundleUI LoadAsset Fail"); }); }
public void ShowMsgBox(string msg) { AssetBundleManager.LoadAsset(_msgBoxBundleUrl, (AssetBundleManager.Asset asset) => { GameObject obj = asset._assetBundle.LoadAsset <GameObject>("MsgBox"); if (null == obj) { return; } GameObject targetObj = Instantiate(obj); MsgBox msgBox = targetObj.GetComponent <MsgBox>(); msgBox.ShowMsg(msg); }, (AssetBundleManager.Asset asset) => { Debug.LogWarning("ShowMsgBox LoadAsset Fail"); }); }
public void ShowShop(ShopController.IapCallbackDelegate iapCallback = null, Callback.CallbackB videoLockCallback = null) { AssetBundleManager.LoadAsset(_shopFullBundleUrl, (AssetBundleManager.Asset asset) => { GameObject obj = asset._assetBundle.LoadAsset <GameObject>("ShopFull"); if (null == obj) { return; } GameObject targetObj = Instantiate(obj); ShopController shop = targetObj.GetComponent <ShopController>(); shop.IapCallback = iapCallback; shop.VideoLockCallback = videoLockCallback; // TODO : handle close action for dipose asset }, (AssetBundleManager.Asset asset) => { Debug.LogWarning("ShowShop LoadAsset Fail"); }); }
public void ShowNetLoading() { if (null != _netLoadingInstance) { return; } AssetBundleManager.LoadAsset(_netLoadingBundleUrl, (AssetBundleManager.Asset asset) => { GameObject obj = asset._assetBundle.LoadAsset <GameObject>("NetLoading"); if (null == obj) { return; } GameObject targetObj = Instantiate(obj); _netLoadingInstance = targetObj.GetComponent <NetLoading>(); }, (AssetBundleManager.Asset asset) => { Debug.LogWarning("ShowNetLoading LoadAsset Fail"); }); }
public void ShowMiniShop(LockManager.IAP_TYPE shopType, string videoLockKey, ShopController.IapCallbackDelegate iapCallback = null, Callback.CallbackB videoLockCallback = null, Callback.CallbackV closeCallback = null) { AssetBundleManager.LoadAsset(_shopMiniBundleUrl, (AssetBundleManager.Asset asset) => { GameObject obj = asset._assetBundle.LoadAsset <GameObject>("ShopMini"); if (null == obj) { return; } GameObject targetObj = Instantiate(obj); ShopController shop = targetObj.GetComponent <ShopController>(); shop.MiniShopType = shopType; shop.VideoLockKey = videoLockKey; shop.IapCallback = iapCallback; shop.VideoLockCallback = videoLockCallback; shop.ShopCloseCallback = closeCallback; // TODO : handle close action for dipose asset }, (AssetBundleManager.Asset asset) => { Debug.LogWarning("ShowMiniShop LoadAsset Fail"); }); }