public string ToString(int index) { int len = 0; IntPtr ptr = LuaAPI.luaL_tolstring(this.m_lua, index, ref len); if (ptr == IntPtr.Zero) { return(string.Empty); } return(Marshal.PtrToStringAnsi(ptr)); }
private static int Lua_Panic(IntPtr lua) { int len = 0; IntPtr ptr = LuaAPI.luaL_tolstring(lua, -1, ref len); if (ptr != IntPtr.Zero) { Debug.LogError(string.Format("Lua Panic {0}", LuaAPI.StringFromNativeUtf8(ptr, len))); } return(0); }