Ejemplo n.º 1
0
 void OnRequestAssetBundleVersion(C2L.RequestAssetBundleVersion packet, C2L.RequestAssetBundleVersionAck ack) //网络初始化之后的回调
 {
     DownloadUrl = ack.download_url;                                                                          //更新的地址
     Debug.LogFormat("000000000000:{0}", DownloadUrl);
     m_SkipHashCheck = ack.skip_hash_check;                                                                   //跳过hash校验
     ProcessBundle(ack.asset_bundle_version, ack.asset_bundle_delta_version);                                 //可能是当前的版本和下一个版本
 }
Ejemplo n.º 2
0
    public void RequestAssetBundleVersion(System.Action <C2L.RequestAssetBundleVersion, C2L.RequestAssetBundleVersionAck> callback)
    {
        var packet = new C2L.RequestAssetBundleVersion();

        packet.app_info = GetAppInfo();
        Debug.LogFormat("bundle_version:{0}", packet.app_info.bundle_version);
        Debug.LogFormat("platform:{0}", packet.app_info.platform);
        Debug.LogFormat("bundle_identifier:{0}", packet.app_info.bundle_identifier);
        Debug.LogFormat("device_info:{0}", packet.app_info.device_info);
        Debug.LogFormat("dataPath:{0}", Application.dataPath);
        game_server.JsonAsync <C2L.RequestAssetBundleVersion, C2L.RequestAssetBundleVersionAck>(packet, callback);
    }