static int _CreateUnityEngine_Networking_DownloadHandlerAssetBundle(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { string arg0 = ToLua.CheckString(L, 1); uint arg1 = (uint)LuaDLL.luaL_checknumber(L, 2); UnityEngine.Networking.DownloadHandlerAssetBundle obj = new UnityEngine.Networking.DownloadHandlerAssetBundle(arg0, arg1); ToLua.PushSealed(L, obj); return(1); } else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L, 2)) { string arg0 = ToLua.CheckString(L, 1); UnityEngine.Hash128 arg1 = StackTraits <UnityEngine.Hash128> .To(L, 2); uint arg2 = (uint)LuaDLL.lua_tonumber(L, 3); UnityEngine.Networking.DownloadHandlerAssetBundle obj = new UnityEngine.Networking.DownloadHandlerAssetBundle(arg0, arg1, arg2); ToLua.PushSealed(L, obj); return(1); } else if (count == 3 && TypeChecker.CheckTypes <uint, uint>(L, 2)) { string arg0 = ToLua.CheckString(L, 1); uint arg1 = (uint)LuaDLL.lua_tonumber(L, 2); uint arg2 = (uint)LuaDLL.lua_tonumber(L, 3); UnityEngine.Networking.DownloadHandlerAssetBundle obj = new UnityEngine.Networking.DownloadHandlerAssetBundle(arg0, arg1, arg2); ToLua.PushSealed(L, obj); return(1); } else if (count == 4) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); UnityEngine.Hash128 arg2 = StackTraits <UnityEngine.Hash128> .Check(L, 3); uint arg3 = (uint)LuaDLL.luaL_checknumber(L, 4); UnityEngine.Networking.DownloadHandlerAssetBundle obj = new UnityEngine.Networking.DownloadHandlerAssetBundle(arg0, arg1, arg2, arg3); ToLua.PushSealed(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Networking.DownloadHandlerAssetBundle.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX__CreateUnityEngine_Networking_DownloadHandlerAssetBundle_YXQP(IntPtr L_YXQP) { try { int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP); if (QPYX_count_YXQP == 2) { string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1); uint QPYX_arg1_YXQP = (uint)LuaDLL.luaL_checknumber(L_YXQP, 2); UnityEngine.Networking.DownloadHandlerAssetBundle QPYX_obj_YXQP = new UnityEngine.Networking.DownloadHandlerAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP); ToLua.PushSealed(L_YXQP, QPYX_obj_YXQP); return(1); } else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L_YXQP, 2)) { string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1); UnityEngine.Hash128 QPYX_arg1_YXQP = StackTraits <UnityEngine.Hash128> .To(L_YXQP, 2); uint QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3); UnityEngine.Networking.DownloadHandlerAssetBundle QPYX_obj_YXQP = new UnityEngine.Networking.DownloadHandlerAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP); ToLua.PushSealed(L_YXQP, QPYX_obj_YXQP); return(1); } else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <uint, uint>(L_YXQP, 2)) { string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1); uint QPYX_arg1_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 2); uint QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3); UnityEngine.Networking.DownloadHandlerAssetBundle QPYX_obj_YXQP = new UnityEngine.Networking.DownloadHandlerAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP); ToLua.PushSealed(L_YXQP, QPYX_obj_YXQP); return(1); } else if (QPYX_count_YXQP == 4) { string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1); string QPYX_arg1_YXQP = ToLua.CheckString(L_YXQP, 2); UnityEngine.Hash128 QPYX_arg2_YXQP = StackTraits <UnityEngine.Hash128> .Check(L_YXQP, 3); uint QPYX_arg3_YXQP = (uint)LuaDLL.luaL_checknumber(L_YXQP, 4); UnityEngine.Networking.DownloadHandlerAssetBundle QPYX_obj_YXQP = new UnityEngine.Networking.DownloadHandlerAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP, QPYX_arg3_YXQP); ToLua.PushSealed(L_YXQP, QPYX_obj_YXQP); return(1); } else { return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to ctor method: UnityEngine.Networking.DownloadHandlerAssetBundle.New")); } } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
private static IEnumerator RunRequest(string url, WWWForm wwwForm, Action <WebResponse> responseHandler, int timeout, bool isAsset) { #if !LP_UNITY_LEGACY_WWW using (var request = CreateWebRequest(url, wwwForm, isAsset)) { request.timeout = timeout; yield return(request.SendWebRequest()); while (!request.isDone) { yield return(null); } if (request.result == UnityNetworkingRequest.Result.ConnectionError || request.result == UnityNetworkingRequest.Result.ProtocolError) { responseHandler(new LeanplumUnityWebResponse(request.responseCode, request.error, null, null)); } else { DownloadHandler download = request.downloadHandler; DownloadHandlerAssetBundle downloadAsset = download as DownloadHandlerAssetBundle; responseHandler(new LeanplumUnityWebResponse(request.responseCode, request.error, !isAsset ? download.text : null, isAsset ? downloadAsset?.assetBundle : null)); } } #else using (WWW www = CreateWww(url, wwwForm, isAsset)) { float elapsed = 0.0f; while (!www.isDone && elapsed < timeout) { elapsed += Time.deltaTime; yield return(null); } if (www.isDone) { responseHandler(new UnityWebResponse(200, www.error, (String.IsNullOrEmpty(www.error) && !isAsset) ? www.text : null, (String.IsNullOrEmpty(www.error) && isAsset) ? www.assetBundle : null)); } else { responseHandler(new UnityWebResponse(408, Constants.NETWORK_TIMEOUT_MESSAGE, String.Empty, null)); } } #endif }
static int get_assetBundle(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Networking.DownloadHandlerAssetBundle obj = (UnityEngine.Networking.DownloadHandlerAssetBundle)o; UnityEngine.AssetBundle ret = obj.assetBundle; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index assetBundle on a nil value")); } }
private static extern IntPtr CreateCached_Injected(DownloadHandlerAssetBundle obj, string url, string name, ref Hash128 hash, uint crc);
private void InternalCreateAssetBundleCached(string url, string name, Hash128 hash, uint crc) { this.m_Ptr = DownloadHandlerAssetBundle.CreateCached(this, url, name, hash, crc); }
private void InternalCreateAssetBundle(string url, uint crc) { this.m_Ptr = DownloadHandlerAssetBundle.Create(this, url, crc); }
private static IntPtr CreateCached(DownloadHandlerAssetBundle obj, string url, string name, Hash128 hash, uint crc) { return(DownloadHandlerAssetBundle.CreateCached_Injected(obj, url, name, ref hash, crc)); }
private static extern IntPtr Create(DownloadHandlerAssetBundle obj, string url, uint crc);
private extern static IntPtr CreateCached(DownloadHandlerAssetBundle obj, string url, string name, Hash128 hash, uint crc);
static int QPYX_get_assetBundle_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); UnityEngine.Networking.DownloadHandlerAssetBundle QPYX_obj_YXQP = (UnityEngine.Networking.DownloadHandlerAssetBundle)QPYX_o_YXQP; UnityEngine.AssetBundle QPYX_ret_YXQP = QPYX_obj_YXQP.assetBundle; ToLua.PushSealed(L_YXQP, QPYX_ret_YXQP); return(1); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index assetBundle on a nil value")); } }