void stackDump(IntPtr L) { int count = LuaDLL.lua_gettop(L); for (int i = 0; i <= count; ++i) { LuaTypes type = LuaDLL.lua_type(L, i); Debug.Log(type.ToString()); } }
public static void stackDump(string action, IntPtr l) { if (bFirst) { int top = LuaDLL.lua_gettop(l); string logMsg = string.Empty; for (int i = 1; i <= top; ++i) { LuaTypes luaType = LuaDLL.lua_type(l, i); logMsg += luaType.ToString().ToLower() + "->"; } Debug.Log(action + ": " + logMsg); } }
public override string ToString() { return("[" + Type.ToString() + ": " + Value.ToString() + "]"); }
/// <summary> /// Returns the name of the type encoded by the value tp, which must be one the values returned by lua_type. /// </summary> public static string TypeName(this ILuaState self, LuaTypes type) { return(type.ToString()); /// Will cause unity crash //return LuaDLL.lua_typename(self, type); }
public static string lua_typename(IntPtr luaState, LuaTypes type) { var t = (int)type; return(type.ToString()); }