コード例 #1
0
ファイル: AssetManager.cs プロジェクト: Lenovezhou/Screenshow
    /// <summary>
    ///  整体替换Assetbundle
    /// </summary>
    /// <param name="AssetArray">Assetbundle路径数组</param>
    public void LoadAsset(List <CurtainManager> AssetArray)
    {
        this.AssetInfo = AssetArray;
        MsgCenter.CleanAllList(MsgCenter.nowWidow);
        server = InitServerConfig.Instance.m_servers;

        foreach (CurtainManager curtain in AssetArray)
        {
            //if (curtain.IsModel == false)
            //{
            //    //如果不是模型,直接加载面片 还贴图

            //    continue;
            //}
            //else
            {
                //如果是模型,加载assetbundle
                string AssetPath = curtain.ModleURL;
                InitServerConfig._instance.m_assetLoader.StartDownload(server, "", AssetPath, curtain, null, eDownloadType.Type_AssetBundle, OnLoadUpdateZipComplete2, OnLoadFaile2, true);
            }
        }
    }