internal static byte[] loadFile(string fn) { try { byte[] bytes; if (loaderDelegate != null) { bytes = loaderDelegate(fn); } else { fn = fn.Replace(".", "/"); TextAsset asset = (TextAsset)Resources.Load(fn); if (asset == null) { return(null); } bytes = asset.bytes; } DebugInterface.require(fn, bytes); return(bytes); } catch (Exception e) { throw new Exception(e.Message); } }
public void init() { if(openDebug) { di = new DebugInterface(state); di.init(); } }
internal static byte[] loadFile(string fn) { try { byte[] bytes; if (loaderDelegate != null) { bytes = loaderDelegate(fn); } else { fn = fn.Replace(".", "/"); #if !SLUA_STANDALONE TextAsset asset = (TextAsset)Resources.Load(fn); if (asset == null) { return(null); } bytes = asset.bytes; #else bytes = File.ReadAllBytes(fn); #endif } if (bytes != null) { DebugInterface.require(fn, bytes); } return(bytes); } catch (Exception e) { throw new Exception(e.Message); } }
public void init() { if (openDebug) { di = new DebugInterface(state); di.init(); } }
public DebugInterface(LuaState L) { state=L; instance=this; IntPtr l = L.L; getTypeTable(l, "LuaDebugger"); addMember(l, output, false); addMember(l, onBreak, false); addMember(l, md5, false); createTypeMetatable(l, typeof(DebugInterface)); }
public DebugInterface(LuaState L) { state = L; instance = this; IntPtr l = L.L; getTypeTable(l, "LuaDebugger"); addMember(l, output, false); addMember(l, onBreak, false); addMember(l, md5, false); createTypeMetatable(l, typeof(DebugInterface)); }
// make sure lua state finalize at last // make sure LuaSvrGameObject excute order is max(9999) void OnDestroy() { if (state != null) { if (di != null) { di.close(); di = null; } state.Dispose(); state = null; } }
void OnDestroy() { if (state != null) { if (di != null) { di.close(); di = null; } // state is disposed by editorapplication if in the Editor // state isn't disposed in App because that all resources will be disposed by app on process exit. } }
// make sure lua state finalize at last // make sure LuaSvrGameObject excute order is max(9999) void OnDestroy() { if (state != null) { if (di != null) { di.close(); di = null; } // Main state shouldn't dispose until app quit due to some mono behaviour use state on disposed // //state.Dispose(); //state = null; } }