static int LoadBytes(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Common.ResMgr.ResMgr obj = (Common.ResMgr.ResMgr)ToLua.CheckObject(L, 1, typeof(Common.ResMgr.ResMgr)); string arg0 = ToLua.CheckString(L, 2); byte[] o = obj.LoadBytes(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int LoadStreamingAssetText(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Common.ResMgr.ResMgr obj = (Common.ResMgr.ResMgr)ToLua.CheckObject(L, 1, typeof(Common.ResMgr.ResMgr)); string arg0 = ToLua.CheckString(L, 2); string o = obj.LoadStreamingAssetText(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_preFightPaths(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Common.ResMgr.ResMgr obj = (Common.ResMgr.ResMgr)o; System.Collections.Generic.List <string> ret = obj.preFightPaths; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index preFightPaths on a nil value" : e.Message)); } }
static int Load(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, typeof(Common.ResMgr.ResMgr), typeof(string))) { Common.ResMgr.ResMgr obj = (Common.ResMgr.ResMgr)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); UnityEngine.Object o = obj.Load(arg0); ToLua.Push(L, o); return(1); } else if (count == 3 && TypeChecker.CheckTypes(L, typeof(Common.ResMgr.ResMgr), typeof(string), typeof(System.Action <UnityEngine.Object>))) { Common.ResMgr.ResMgr obj = (Common.ResMgr.ResMgr)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); System.Action <UnityEngine.Object> arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (System.Action <UnityEngine.Object>)ToLua.ToObject(L, 3); } else { LuaFunction func = ToLua.ToLuaFunction(L, 3); arg1 = DelegateFactory.CreateDelegate(typeof(System.Action <UnityEngine.Object>), func) as System.Action <UnityEngine.Object>; } obj.Load(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Common.ResMgr.ResMgr.Load")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); Common.ResMgr.ResMgr resMgr = target as Common.ResMgr.ResMgr; if (resMgr.loadedRes != null) { EditorGUILayout.LabelField("LoadedResDicCount", resMgr.loadedRes.Count.ToString()); int i = 0; foreach (var kv in resMgr.loadedRes) { EditorGUILayout.LabelField((++i).ToString(), kv); } } if (resMgr.resDic != null) { EditorGUILayout.LabelField("resDicCount", resMgr.resDic.Count.ToString()); int i = 0; foreach (var kv in resMgr.resDic) { EditorGUILayout.LabelField((++i).ToString(), kv.Key); } } EditorGUILayout.LabelField("load fail ab count", resMgr.loadFailCount.ToString()); if (resMgr.assetBundleDic != null) { EditorGUILayout.LabelField("assetBundleDic", resMgr.assetBundleDic.Count.ToString()); int i = 0; foreach (var kv in resMgr.assetBundleDic) { EditorGUILayout.LabelField((++i).ToString(), kv.Key); } } if (resMgr.localManifest != null) { EditorGUILayout.LabelField("Ver:", resMgr.localManifest.version.ToString()); int i = 0; foreach (var kv in resMgr.localManifest.assetDic) { EditorGUILayout.LabelField((++i).ToString(), kv.Value.ToString()); } } if (resMgr.loadingList != null) { EditorGUILayout.LabelField("loadingList:", resMgr.loadingList.Count.ToString()); int i = 0; foreach (var kv in resMgr.loadingList) { EditorGUILayout.LabelField((++i).ToString(), kv.ResObj.SubPath.ToString()); } } if (resMgr.waitingList != null) { EditorGUILayout.LabelField("waitingList:", resMgr.waitingList.Count.ToString()); int i = 0; foreach (var kv in resMgr.waitingList) { EditorGUILayout.LabelField((++i).ToString(), kv.ResObj.SubPath.ToString()); } } if (resMgr.waitingABs != null) { EditorGUILayout.LabelField("waitingABs:", resMgr.waitingABs.Count.ToString()); int i = 0; foreach (var kv in resMgr.waitingABs) { EditorGUILayout.LabelField((++i).ToString(), kv.assetbundlePath); } } if (resMgr.loadingABs != null) { EditorGUILayout.LabelField("loadingABs:", resMgr.loadingABs.Count.ToString()); int i = 0; foreach (var kv in resMgr.loadingABs) { EditorGUILayout.LabelField((++i).ToString(), kv.assetbundlePath); } } }