源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
4.6 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class UnityEngine_ResourcesWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginStaticLibs("Resources");
  9. L.RegFunction("FindObjectsOfTypeAll", FindObjectsOfTypeAll);
  10. L.RegFunction("Load", Load);
  11. L.RegFunction("LoadAsync", LoadAsync);
  12. L.RegFunction("LoadAll", LoadAll);
  13. L.RegFunction("GetBuiltinResource", GetBuiltinResource);
  14. L.RegFunction("UnloadAsset", UnloadAsset);
  15. L.RegFunction("UnloadUnusedAssets", UnloadUnusedAssets);
  16. L.EndStaticLibs();
  17. }
  18. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  19. static int FindObjectsOfTypeAll(IntPtr L)
  20. {
  21. try
  22. {
  23. ToLua.CheckArgsCount(L, 1);
  24. System.Type arg0 = (System.Type)ToLua.CheckObject(L, 1, typeof(System.Type));
  25. UnityEngine.Object[] o = UnityEngine.Resources.FindObjectsOfTypeAll(arg0);
  26. ToLua.Push(L, o);
  27. return 1;
  28. }
  29. catch(Exception e)
  30. {
  31. return LuaDLL.toluaL_exception(L, e);
  32. }
  33. }
  34. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  35. static int Load(IntPtr L)
  36. {
  37. try
  38. {
  39. int count = LuaDLL.lua_gettop(L);
  40. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  41. {
  42. string arg0 = ToLua.ToString(L, 1);
  43. UnityEngine.Object o = UnityEngine.Resources.Load(arg0);
  44. ToLua.Push(L, o);
  45. return 1;
  46. }
  47. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.Type)))
  48. {
  49. string arg0 = ToLua.ToString(L, 1);
  50. System.Type arg1 = (System.Type)ToLua.ToObject(L, 2);
  51. UnityEngine.Object o = UnityEngine.Resources.Load(arg0, arg1);
  52. ToLua.Push(L, o);
  53. return 1;
  54. }
  55. else
  56. {
  57. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Resources.Load");
  58. }
  59. }
  60. catch(Exception e)
  61. {
  62. return LuaDLL.toluaL_exception(L, e);
  63. }
  64. }
  65. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  66. static int LoadAsync(IntPtr L)
  67. {
  68. try
  69. {
  70. int count = LuaDLL.lua_gettop(L);
  71. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  72. {
  73. string arg0 = ToLua.ToString(L, 1);
  74. UnityEngine.ResourceRequest o = UnityEngine.Resources.LoadAsync(arg0);
  75. ToLua.PushObject(L, o);
  76. return 1;
  77. }
  78. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.Type)))
  79. {
  80. string arg0 = ToLua.ToString(L, 1);
  81. System.Type arg1 = (System.Type)ToLua.ToObject(L, 2);
  82. UnityEngine.ResourceRequest o = UnityEngine.Resources.LoadAsync(arg0, arg1);
  83. ToLua.PushObject(L, o);
  84. return 1;
  85. }
  86. else
  87. {
  88. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Resources.LoadAsync");
  89. }
  90. }
  91. catch(Exception e)
  92. {
  93. return LuaDLL.toluaL_exception(L, e);
  94. }
  95. }
  96. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  97. static int LoadAll(IntPtr L)
  98. {
  99. try
  100. {
  101. int count = LuaDLL.lua_gettop(L);
  102. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  103. {
  104. string arg0 = ToLua.ToString(L, 1);
  105. UnityEngine.Object[] o = UnityEngine.Resources.LoadAll(arg0);
  106. ToLua.Push(L, o);
  107. return 1;
  108. }
  109. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.Type)))
  110. {
  111. string arg0 = ToLua.ToString(L, 1);
  112. System.Type arg1 = (System.Type)ToLua.ToObject(L, 2);
  113. UnityEngine.Object[] o = UnityEngine.Resources.LoadAll(arg0, arg1);
  114. ToLua.Push(L, o);
  115. return 1;
  116. }
  117. else
  118. {
  119. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Resources.LoadAll");
  120. }
  121. }
  122. catch(Exception e)
  123. {
  124. return LuaDLL.toluaL_exception(L, e);
  125. }
  126. }
  127. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  128. static int GetBuiltinResource(IntPtr L)
  129. {
  130. try
  131. {
  132. ToLua.CheckArgsCount(L, 2);
  133. System.Type arg0 = (System.Type)ToLua.CheckObject(L, 1, typeof(System.Type));
  134. string arg1 = ToLua.CheckString(L, 2);
  135. UnityEngine.Object o = UnityEngine.Resources.GetBuiltinResource(arg0, arg1);
  136. ToLua.Push(L, o);
  137. return 1;
  138. }
  139. catch(Exception e)
  140. {
  141. return LuaDLL.toluaL_exception(L, e);
  142. }
  143. }
  144. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  145. static int UnloadAsset(IntPtr L)
  146. {
  147. try
  148. {
  149. ToLua.CheckArgsCount(L, 1);
  150. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.Object));
  151. UnityEngine.Resources.UnloadAsset(arg0);
  152. return 0;
  153. }
  154. catch(Exception e)
  155. {
  156. return LuaDLL.toluaL_exception(L, e);
  157. }
  158. }
  159. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  160. static int UnloadUnusedAssets(IntPtr L)
  161. {
  162. try
  163. {
  164. ToLua.CheckArgsCount(L, 0);
  165. UnityEngine.AsyncOperation o = UnityEngine.Resources.UnloadUnusedAssets();
  166. ToLua.PushObject(L, o);
  167. return 1;
  168. }
  169. catch(Exception e)
  170. {
  171. return LuaDLL.toluaL_exception(L, e);
  172. }
  173. }
  174. }