zoukankan      html  css  js  c++  java
  • AssetBundle 在Android机子上进行读取 .

    http://game.ceeger.com/Manual/StreamingAssets.html

    我看到官方文档中说明:
    Note that bundles are not fully compatible between platforms. A bundle built for any of the standalone platforms (including webplayer) can be loaded on any of those platforms but not on iOS or Android. Furthermore, a bundle built for iOS is not compatible with Android and vice versa.

    但是我们看到,用以下步骤进行在Android机子上使用AssetBundle

    重点有2点:

    1. Use the option "BuildTarget.Android".
    2. Describe the path with triple slash "file:///"

    以下是步骤:

    1. Delete directories "Per Texture Materials", "assetbundles", and so on.  把已经导出过的包删掉
    2. Use the option "BuildTarget.Android" to all "BuildPipeline.BuildAssetBundle".   要把BuildTarget为Android平台!!!
    3. Run these on Editor. Character Generator/Generate Materials Character Generator/Create Assetbundles Character Generator/Update Character Element Database  
    4. Copy Assetbundles database to Android device which like "/mnt/sdcard/assetbundles/"  把这些包放到Android的指定目录下
    5. Modify AssetbundleBaseURL. (the point was "file:///") 修改获取AssetbundleBaseURL基础路径的地址
    public static string AssetbundleBaseURL
    {
        get
        {
            if (Application.platform == RuntimePlatform.WindowsWebPlayer || Application.platform == RuntimePlatform.OSXWebPlayer)
            {
                return Application.dataPath + "/assetbundles/";
            }
            else if (Application.platform == RuntimePlatform.Android)
            {
                return "file:///mnt/sdcard/assetbundles/";
            }
            else
            {
                return "file://" + Application.dataPath + "/../assetbundles/";
            }
        }
    }


  • 相关阅读:
    [bzoj1468]Tree(点分治)
    [bzoj1087]: [SCOI2005]互不侵犯King(状压dp)
    [hdu5628]Clarke and math(dirichlet卷积)
    [bzoj1036]:[ZJOI2008]树的统计Count(树链剖分)
    [bzoj1026][SCOI2009]windy数(前缀和+数位dp)
    洛谷 P1714 切蛋糕(dp+RMQ)
    [hdu3507] Print Article
    [bzoj1597]: [Usaco2008 Mar]土地购买
    php基础二
    php基础
  • 原文地址:https://www.cnblogs.com/softimagewht/p/3220757.html
Copyright © 2011-2022 走看看