ToLua_System_String.cs 796 B

12345678910111213141516171819202122232425262728293031323334
  1. using UnityEngine;
  2. using System.Collections;
  3. using LuaInterface;
  4. public class ToLua_System_String
  5. {
  6. [NoToLuaAttribute]
  7. public static string ToLua_System_StringDefined =
  8. @" try
  9. {
  10. LuaTypes luatype = LuaDLL.lua_type(L, 1);
  11. if (luatype == LuaTypes.LUA_TSTRING)
  12. {
  13. string arg0 = LuaDLL.lua_tostring(L, 1);
  14. ToLua.PushSealed(L, arg0);
  15. return 1;
  16. }
  17. else
  18. {
  19. return LuaDLL.luaL_throw(L, ""invalid arguments to string's ctor method"");
  20. }
  21. }
  22. catch(Exception e)
  23. {
  24. return LuaDLL.toluaL_exception(L, e);
  25. }";
  26. [UseDefinedAttribute]
  27. public ToLua_System_String()
  28. {
  29. }
  30. }