zoukankan      html  css  js  c++  java
  • unity2018几种加载assetbunlde方式

    AssetBundle的几种加载方式

    一:load byte as bundle

     UnityWebRequest webBBLoadRequest = UnityWebRequest.Get(path);

                        yield return webBBLoadRequest.SendWebRequest();

                        container.bytes = webBBLoadRequest.downloadHandler.data;

                        AssetBundleCreateRequest bundleCreationRequest = AssetBundle.LoadFromMemoryAsync(container.bytes);

                        yield return bundleCreationRequest;

                        container.assetBundle = bundleCreationRequest.assetBundle;

    二:load byte

      UnityWebRequest webBytesLoadRequest = UnityWebRequest.Get(path);

                        yield return webBytesLoadRequest.SendWebRequest();

                        container.bytes = webBytesLoadRequest.downloadHandler.data;

    三:load bundle:

      UnityWebRequest webBundleRequest = UnityWebRequestAssetBundle.GetAssetBundle(path);

                        yield return webBundleRequest.SendWebRequest();

                        container.assetBundle = DownloadHandlerAssetBundle.GetContent(webBundleRequest);

    四:load local bundle

     AssetBundleCreateRequest fileBundleRequest = AssetBundle.LoadFromFileAsync(path);

                        yield return fileBundleRequest;

                        container.assetBundle = fileBundleRequest.assetBundle;

  • 相关阅读:
    函数调用堆栈过程
    opencv相关的一些资料
    Debug模式下加快运行速度的一些方法
    目标检测的资料汇总
    Unity常见词汇查询表
    迷宫遍历板子
    Codeforces Round #739 (Div. 3)
    Codeforces Round #737 (Div. 2)
    快乐的一天从AC开始 | 20210810 | CF1554D
    快乐的一天从AC开始 | 20210809 | CF1554C
  • 原文地址:https://www.cnblogs.com/DOGame/p/12304330.html
Copyright © 2011-2022 走看看