UnityEngine_GameObjectWrap.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using UnityEngine;
  4. using LuaInterface;
  5. public class UnityEngine_GameObjectWrap
  6. {
  7. public static void Register(LuaState L)
  8. {
  9. L.BeginClass(typeof(UnityEngine.GameObject), typeof(UnityEngine.Object));
  10. L.RegFunction("CreatePrimitive", CreatePrimitive);
  11. L.RegFunction("GetComponent", GetComponent);
  12. L.RegFunction("GetComponentInChildren", GetComponentInChildren);
  13. L.RegFunction("GetComponentInParent", GetComponentInParent);
  14. L.RegFunction("GetComponents", GetComponents);
  15. L.RegFunction("GetComponentsInChildren", GetComponentsInChildren);
  16. L.RegFunction("GetComponentsInParent", GetComponentsInParent);
  17. L.RegFunction("FindWithTag", FindWithTag);
  18. L.RegFunction("SetActive", SetActive);
  19. L.RegFunction("CompareTag", CompareTag);
  20. L.RegFunction("FindGameObjectWithTag", FindGameObjectWithTag);
  21. L.RegFunction("FindGameObjectsWithTag", FindGameObjectsWithTag);
  22. L.RegFunction("Find", Find);
  23. L.RegFunction("AddComponent", AddComponent);
  24. L.RegFunction("BroadcastMessage", BroadcastMessage);
  25. L.RegFunction("SendMessageUpwards", SendMessageUpwards);
  26. L.RegFunction("SendMessage", SendMessage);
  27. L.RegFunction("ResetTransform", ResetTransform);
  28. L.RegFunction("SetParentNormalize", SetParentNormalize);
  29. L.RegFunction("Destroy", Destroy);
  30. L.RegFunction("DestroyImmediate", DestroyImmediate);
  31. L.RegFunction("SetMaterialGray", SetMaterialGray);
  32. L.RegFunction("SetMaterialBlack", SetMaterialBlack);
  33. L.RegFunction("GetOrAddComponent", GetOrAddComponent);
  34. L.RegFunction("DestroyComponent", DestroyComponent);
  35. L.RegFunction("SetSafeActive", SetSafeActive);
  36. L.RegFunction("Root", Root);
  37. L.RegFunction("Instantiate", Instantiate);
  38. L.RegFunction("New", _CreateUnityEngine_GameObject);
  39. L.RegFunction("__eq", op_Equality);
  40. L.RegFunction("__tostring", ToLua.op_ToString);
  41. L.RegVar("transform", get_transform, null);
  42. L.RegVar("layer", get_layer, set_layer);
  43. L.RegVar("activeSelf", get_activeSelf, null);
  44. L.RegVar("activeInHierarchy", get_activeInHierarchy, null);
  45. L.RegVar("isStatic", get_isStatic, set_isStatic);
  46. L.RegVar("tag", get_tag, set_tag);
  47. L.RegVar("scene", get_scene, null);
  48. L.RegVar("gameObject", get_gameObject, null);
  49. L.EndClass();
  50. }
  51. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  52. static int _CreateUnityEngine_GameObject(IntPtr L)
  53. {
  54. try
  55. {
  56. int count = LuaDLL.lua_gettop(L);
  57. if (count == 0)
  58. {
  59. UnityEngine.GameObject obj = new UnityEngine.GameObject();
  60. ToLua.PushSealed(L, obj);
  61. return 1;
  62. }
  63. else if (count == 1 && TypeChecker.CheckTypes<string>(L, 1))
  64. {
  65. string arg0 = ToLua.ToString(L, 1);
  66. UnityEngine.GameObject obj = new UnityEngine.GameObject(arg0);
  67. ToLua.PushSealed(L, obj);
  68. return 1;
  69. }
  70. else if (TypeChecker.CheckTypes<string>(L, 1) && TypeChecker.CheckParamsType<System.Type>(L, 2, count - 1))
  71. {
  72. string arg0 = ToLua.ToString(L, 1);
  73. System.Type[] arg1 = ToLua.ToParamsObject<System.Type>(L, 2, count - 1);
  74. UnityEngine.GameObject obj = new UnityEngine.GameObject(arg0, arg1);
  75. ToLua.PushSealed(L, obj);
  76. return 1;
  77. }
  78. else
  79. {
  80. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.GameObject.New");
  81. }
  82. }
  83. catch (Exception e)
  84. {
  85. return LuaDLL.toluaL_exception(L, e);
  86. }
  87. }
  88. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  89. static int CreatePrimitive(IntPtr L)
  90. {
  91. try
  92. {
  93. ToLua.CheckArgsCount(L, 1);
  94. UnityEngine.PrimitiveType arg0 = (UnityEngine.PrimitiveType)ToLua.CheckObject(L, 1, typeof(UnityEngine.PrimitiveType));
  95. UnityEngine.GameObject o = UnityEngine.GameObject.CreatePrimitive(arg0);
  96. ToLua.PushSealed(L, o);
  97. return 1;
  98. }
  99. catch (Exception e)
  100. {
  101. return LuaDLL.toluaL_exception(L, e);
  102. }
  103. }
  104. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  105. static int GetComponent(IntPtr L)
  106. {
  107. try
  108. {
  109. int count = LuaDLL.lua_gettop(L);
  110. if (count == 2 && TypeChecker.CheckTypes<System.Type>(L, 2))
  111. {
  112. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  113. System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
  114. UnityEngine.Component o = obj.GetComponent(arg0);
  115. ToLua.Push(L, o);
  116. return 1;
  117. }
  118. else if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
  119. {
  120. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  121. string arg0 = ToLua.ToString(L, 2);
  122. UnityEngine.Component o = obj.GetComponent(arg0);
  123. ToLua.Push(L, o);
  124. return 1;
  125. }
  126. else
  127. {
  128. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponent");
  129. }
  130. }
  131. catch (Exception e)
  132. {
  133. return LuaDLL.toluaL_exception(L, e);
  134. }
  135. }
  136. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  137. static int GetComponentInChildren(IntPtr L)
  138. {
  139. try
  140. {
  141. int count = LuaDLL.lua_gettop(L);
  142. if (count == 2)
  143. {
  144. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  145. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  146. UnityEngine.Component o = obj.GetComponentInChildren(arg0);
  147. ToLua.Push(L, o);
  148. return 1;
  149. }
  150. else if (count == 3)
  151. {
  152. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  153. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  154. bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
  155. UnityEngine.Component o = obj.GetComponentInChildren(arg0, arg1);
  156. ToLua.Push(L, o);
  157. return 1;
  158. }
  159. else
  160. {
  161. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentInChildren");
  162. }
  163. }
  164. catch (Exception e)
  165. {
  166. return LuaDLL.toluaL_exception(L, e);
  167. }
  168. }
  169. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  170. static int GetComponentInParent(IntPtr L)
  171. {
  172. try
  173. {
  174. ToLua.CheckArgsCount(L, 2);
  175. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  176. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  177. UnityEngine.Component o = obj.GetComponentInParent(arg0);
  178. ToLua.Push(L, o);
  179. return 1;
  180. }
  181. catch (Exception e)
  182. {
  183. return LuaDLL.toluaL_exception(L, e);
  184. }
  185. }
  186. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  187. static int GetComponents(IntPtr L)
  188. {
  189. try
  190. {
  191. int count = LuaDLL.lua_gettop(L);
  192. if (count == 2)
  193. {
  194. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  195. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  196. UnityEngine.Component[] o = obj.GetComponents(arg0);
  197. ToLua.Push(L, o);
  198. return 1;
  199. }
  200. else if (count == 3)
  201. {
  202. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  203. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  204. System.Collections.Generic.List<UnityEngine.Component> arg1 = (System.Collections.Generic.List<UnityEngine.Component>)ToLua.CheckObject(L, 3, typeof(System.Collections.Generic.List<UnityEngine.Component>));
  205. obj.GetComponents(arg0, arg1);
  206. return 0;
  207. }
  208. else
  209. {
  210. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponents");
  211. }
  212. }
  213. catch (Exception e)
  214. {
  215. return LuaDLL.toluaL_exception(L, e);
  216. }
  217. }
  218. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  219. static int GetComponentsInChildren(IntPtr L)
  220. {
  221. try
  222. {
  223. int count = LuaDLL.lua_gettop(L);
  224. if (count == 2)
  225. {
  226. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  227. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  228. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0);
  229. ToLua.Push(L, o);
  230. return 1;
  231. }
  232. else if (count == 3)
  233. {
  234. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  235. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  236. bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
  237. UnityEngine.Component[] o = obj.GetComponentsInChildren(arg0, arg1);
  238. ToLua.Push(L, o);
  239. return 1;
  240. }
  241. else
  242. {
  243. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentsInChildren");
  244. }
  245. }
  246. catch (Exception e)
  247. {
  248. return LuaDLL.toluaL_exception(L, e);
  249. }
  250. }
  251. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  252. static int GetComponentsInParent(IntPtr L)
  253. {
  254. try
  255. {
  256. int count = LuaDLL.lua_gettop(L);
  257. if (count == 2)
  258. {
  259. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  260. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  261. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0);
  262. ToLua.Push(L, o);
  263. return 1;
  264. }
  265. else if (count == 3)
  266. {
  267. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  268. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  269. bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
  270. UnityEngine.Component[] o = obj.GetComponentsInParent(arg0, arg1);
  271. ToLua.Push(L, o);
  272. return 1;
  273. }
  274. else
  275. {
  276. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.GetComponentsInParent");
  277. }
  278. }
  279. catch (Exception e)
  280. {
  281. return LuaDLL.toluaL_exception(L, e);
  282. }
  283. }
  284. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  285. static int FindWithTag(IntPtr L)
  286. {
  287. try
  288. {
  289. ToLua.CheckArgsCount(L, 1);
  290. string arg0 = ToLua.CheckString(L, 1);
  291. UnityEngine.GameObject o = UnityEngine.GameObject.FindWithTag(arg0);
  292. ToLua.PushSealed(L, o);
  293. return 1;
  294. }
  295. catch (Exception e)
  296. {
  297. return LuaDLL.toluaL_exception(L, e);
  298. }
  299. }
  300. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  301. static int SetActive(IntPtr L)
  302. {
  303. try
  304. {
  305. ToLua.CheckArgsCount(L, 2);
  306. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  307. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  308. obj.SetActive(arg0);
  309. return 0;
  310. }
  311. catch (Exception e)
  312. {
  313. return LuaDLL.toluaL_exception(L, e);
  314. }
  315. }
  316. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  317. static int CompareTag(IntPtr L)
  318. {
  319. try
  320. {
  321. ToLua.CheckArgsCount(L, 2);
  322. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  323. string arg0 = ToLua.CheckString(L, 2);
  324. bool o = obj.CompareTag(arg0);
  325. LuaDLL.lua_pushboolean(L, o);
  326. return 1;
  327. }
  328. catch (Exception e)
  329. {
  330. return LuaDLL.toluaL_exception(L, e);
  331. }
  332. }
  333. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  334. static int FindGameObjectWithTag(IntPtr L)
  335. {
  336. try
  337. {
  338. ToLua.CheckArgsCount(L, 1);
  339. string arg0 = ToLua.CheckString(L, 1);
  340. UnityEngine.GameObject o = UnityEngine.GameObject.FindGameObjectWithTag(arg0);
  341. ToLua.PushSealed(L, o);
  342. return 1;
  343. }
  344. catch (Exception e)
  345. {
  346. return LuaDLL.toluaL_exception(L, e);
  347. }
  348. }
  349. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  350. static int FindGameObjectsWithTag(IntPtr L)
  351. {
  352. try
  353. {
  354. ToLua.CheckArgsCount(L, 1);
  355. string arg0 = ToLua.CheckString(L, 1);
  356. UnityEngine.GameObject[] o = UnityEngine.GameObject.FindGameObjectsWithTag(arg0);
  357. ToLua.Push(L, o);
  358. return 1;
  359. }
  360. catch (Exception e)
  361. {
  362. return LuaDLL.toluaL_exception(L, e);
  363. }
  364. }
  365. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  366. static int Find(IntPtr L)
  367. {
  368. try
  369. {
  370. ToLua.CheckArgsCount(L, 1);
  371. string arg0 = ToLua.CheckString(L, 1);
  372. UnityEngine.GameObject o = UnityEngine.GameObject.Find(arg0);
  373. ToLua.PushSealed(L, o);
  374. return 1;
  375. }
  376. catch (Exception e)
  377. {
  378. return LuaDLL.toluaL_exception(L, e);
  379. }
  380. }
  381. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  382. static int AddComponent(IntPtr L)
  383. {
  384. IntPtr L0 = LuaException.L;
  385. try
  386. {
  387. ++LuaException.InstantiateCount;
  388. LuaException.L = L;
  389. ToLua.CheckArgsCount(L, 2);
  390. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  391. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  392. UnityEngine.Component o = obj.AddComponent(arg0);
  393. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  394. {
  395. string error = LuaDLL.lua_tostring(L, -1);
  396. LuaDLL.lua_pop(L, 1);
  397. throw new LuaException(error, LuaException.GetLastError());
  398. }
  399. ToLua.Push(L, o);
  400. LuaException.L = L0;
  401. --LuaException.InstantiateCount;
  402. return 1;
  403. }
  404. catch (Exception e)
  405. {
  406. LuaException.L = L0;
  407. --LuaException.InstantiateCount;
  408. return LuaDLL.toluaL_exception(L, e);
  409. }
  410. }
  411. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  412. static int BroadcastMessage(IntPtr L)
  413. {
  414. IntPtr L0 = LuaException.L;
  415. try
  416. {
  417. ++LuaException.SendMsgCount;
  418. LuaException.L = L;
  419. int count = LuaDLL.lua_gettop(L);
  420. if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
  421. {
  422. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  423. string arg0 = ToLua.ToString(L, 2);
  424. obj.BroadcastMessage(arg0);
  425. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  426. {
  427. string error = LuaDLL.lua_tostring(L, -1);
  428. LuaDLL.lua_pop(L, 1);
  429. throw new LuaException(error, LuaException.GetLastError());
  430. }
  431. --LuaException.SendMsgCount;
  432. LuaException.L = L0;
  433. return 0;
  434. }
  435. else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
  436. {
  437. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  438. string arg0 = ToLua.ToString(L, 2);
  439. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  440. obj.BroadcastMessage(arg0, arg1);
  441. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  442. {
  443. string error = LuaDLL.lua_tostring(L, -1);
  444. LuaDLL.lua_pop(L, 1);
  445. throw new LuaException(error, LuaException.GetLastError());
  446. }
  447. --LuaException.SendMsgCount;
  448. LuaException.L = L0;
  449. return 0;
  450. }
  451. else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
  452. {
  453. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  454. string arg0 = ToLua.ToString(L, 2);
  455. object arg1 = ToLua.ToVarObject(L, 3);
  456. obj.BroadcastMessage(arg0, arg1);
  457. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  458. {
  459. string error = LuaDLL.lua_tostring(L, -1);
  460. LuaDLL.lua_pop(L, 1);
  461. throw new LuaException(error, LuaException.GetLastError());
  462. }
  463. --LuaException.SendMsgCount;
  464. LuaException.L = L0;
  465. return 0;
  466. }
  467. else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
  468. {
  469. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  470. string arg0 = ToLua.ToString(L, 2);
  471. object arg1 = ToLua.ToVarObject(L, 3);
  472. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  473. obj.BroadcastMessage(arg0, arg1, arg2);
  474. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  475. {
  476. string error = LuaDLL.lua_tostring(L, -1);
  477. LuaDLL.lua_pop(L, 1);
  478. throw new LuaException(error, LuaException.GetLastError());
  479. }
  480. --LuaException.SendMsgCount;
  481. LuaException.L = L0;
  482. return 0;
  483. }
  484. else
  485. {
  486. --LuaException.SendMsgCount;
  487. LuaException.L = L0;
  488. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.BroadcastMessage");
  489. }
  490. }
  491. catch (Exception e)
  492. {
  493. --LuaException.SendMsgCount;
  494. LuaException.L = L0;
  495. return LuaDLL.toluaL_exception(L, e);
  496. }
  497. }
  498. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  499. static int SendMessageUpwards(IntPtr L)
  500. {
  501. IntPtr L0 = LuaException.L;
  502. try
  503. {
  504. ++LuaException.SendMsgCount;
  505. LuaException.L = L;
  506. int count = LuaDLL.lua_gettop(L);
  507. if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
  508. {
  509. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  510. string arg0 = ToLua.ToString(L, 2);
  511. obj.SendMessageUpwards(arg0);
  512. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  513. {
  514. string error = LuaDLL.lua_tostring(L, -1);
  515. LuaDLL.lua_pop(L, 1);
  516. throw new LuaException(error, LuaException.GetLastError());
  517. }
  518. --LuaException.SendMsgCount;
  519. LuaException.L = L0;
  520. return 0;
  521. }
  522. else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
  523. {
  524. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  525. string arg0 = ToLua.ToString(L, 2);
  526. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  527. obj.SendMessageUpwards(arg0, arg1);
  528. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  529. {
  530. string error = LuaDLL.lua_tostring(L, -1);
  531. LuaDLL.lua_pop(L, 1);
  532. throw new LuaException(error, LuaException.GetLastError());
  533. }
  534. --LuaException.SendMsgCount;
  535. LuaException.L = L0;
  536. return 0;
  537. }
  538. else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
  539. {
  540. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  541. string arg0 = ToLua.ToString(L, 2);
  542. object arg1 = ToLua.ToVarObject(L, 3);
  543. obj.SendMessageUpwards(arg0, arg1);
  544. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  545. {
  546. string error = LuaDLL.lua_tostring(L, -1);
  547. LuaDLL.lua_pop(L, 1);
  548. throw new LuaException(error, LuaException.GetLastError());
  549. }
  550. --LuaException.SendMsgCount;
  551. LuaException.L = L0;
  552. return 0;
  553. }
  554. else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
  555. {
  556. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  557. string arg0 = ToLua.ToString(L, 2);
  558. object arg1 = ToLua.ToVarObject(L, 3);
  559. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  560. obj.SendMessageUpwards(arg0, arg1, arg2);
  561. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  562. {
  563. string error = LuaDLL.lua_tostring(L, -1);
  564. LuaDLL.lua_pop(L, 1);
  565. throw new LuaException(error, LuaException.GetLastError());
  566. }
  567. --LuaException.SendMsgCount;
  568. LuaException.L = L0;
  569. return 0;
  570. }
  571. else
  572. {
  573. --LuaException.SendMsgCount;
  574. LuaException.L = L0;
  575. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SendMessageUpwards");
  576. }
  577. }
  578. catch (Exception e)
  579. {
  580. --LuaException.SendMsgCount;
  581. LuaException.L = L0;
  582. return LuaDLL.toluaL_exception(L, e);
  583. }
  584. }
  585. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  586. static int SendMessage(IntPtr L)
  587. {
  588. IntPtr L0 = LuaException.L;
  589. try
  590. {
  591. ++LuaException.SendMsgCount;
  592. LuaException.L = L;
  593. int count = LuaDLL.lua_gettop(L);
  594. if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
  595. {
  596. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  597. string arg0 = ToLua.ToString(L, 2);
  598. obj.SendMessage(arg0);
  599. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  600. {
  601. string error = LuaDLL.lua_tostring(L, -1);
  602. LuaDLL.lua_pop(L, 1);
  603. throw new LuaException(error, LuaException.GetLastError());
  604. }
  605. --LuaException.SendMsgCount;
  606. LuaException.L = L0;
  607. return 0;
  608. }
  609. else if (count == 3 && TypeChecker.CheckTypes<string, UnityEngine.SendMessageOptions>(L, 2))
  610. {
  611. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  612. string arg0 = ToLua.ToString(L, 2);
  613. UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
  614. obj.SendMessage(arg0, arg1);
  615. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  616. {
  617. string error = LuaDLL.lua_tostring(L, -1);
  618. LuaDLL.lua_pop(L, 1);
  619. throw new LuaException(error, LuaException.GetLastError());
  620. }
  621. --LuaException.SendMsgCount;
  622. LuaException.L = L0;
  623. return 0;
  624. }
  625. else if (count == 3 && TypeChecker.CheckTypes<string, object>(L, 2))
  626. {
  627. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  628. string arg0 = ToLua.ToString(L, 2);
  629. object arg1 = ToLua.ToVarObject(L, 3);
  630. obj.SendMessage(arg0, arg1);
  631. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  632. {
  633. string error = LuaDLL.lua_tostring(L, -1);
  634. LuaDLL.lua_pop(L, 1);
  635. throw new LuaException(error, LuaException.GetLastError());
  636. }
  637. --LuaException.SendMsgCount;
  638. LuaException.L = L0;
  639. return 0;
  640. }
  641. else if (count == 4 && TypeChecker.CheckTypes<string, object, UnityEngine.SendMessageOptions>(L, 2))
  642. {
  643. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  644. string arg0 = ToLua.ToString(L, 2);
  645. object arg1 = ToLua.ToVarObject(L, 3);
  646. UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
  647. obj.SendMessage(arg0, arg1, arg2);
  648. if (LuaDLL.lua_toboolean(L, LuaDLL.lua_upvalueindex(1)))
  649. {
  650. string error = LuaDLL.lua_tostring(L, -1);
  651. LuaDLL.lua_pop(L, 1);
  652. throw new LuaException(error, LuaException.GetLastError());
  653. }
  654. --LuaException.SendMsgCount;
  655. LuaException.L = L0;
  656. return 0;
  657. }
  658. else
  659. {
  660. --LuaException.SendMsgCount;
  661. LuaException.L = L0;
  662. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SendMessage");
  663. }
  664. }
  665. catch(Exception e)
  666. {
  667. --LuaException.SendMsgCount;
  668. LuaException.L = L0;
  669. return LuaDLL.toluaL_exception(L, e);
  670. }
  671. }
  672. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  673. static int ResetTransform(IntPtr L)
  674. {
  675. try
  676. {
  677. ToLua.CheckArgsCount(L, 1);
  678. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  679. obj.ResetTransform();
  680. return 0;
  681. }
  682. catch (Exception e)
  683. {
  684. return LuaDLL.toluaL_exception(L, e);
  685. }
  686. }
  687. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  688. static int SetParentNormalize(IntPtr L)
  689. {
  690. try
  691. {
  692. int count = LuaDLL.lua_gettop(L);
  693. if (count == 2 && TypeChecker.CheckTypes<UnityEngine.Transform>(L, 2))
  694. {
  695. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  696. UnityEngine.Transform arg0 = (UnityEngine.Transform)ToLua.ToObject(L, 2);
  697. obj.SetParentNormalize(arg0);
  698. return 0;
  699. }
  700. else if (count == 2 && TypeChecker.CheckTypes<UnityEngine.GameObject>(L, 2))
  701. {
  702. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  703. UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 2);
  704. obj.SetParentNormalize(arg0);
  705. return 0;
  706. }
  707. else
  708. {
  709. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SetParentNormalize");
  710. }
  711. }
  712. catch (Exception e)
  713. {
  714. return LuaDLL.toluaL_exception(L, e);
  715. }
  716. }
  717. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  718. static int Destroy(IntPtr L)
  719. {
  720. try
  721. {
  722. int count = LuaDLL.lua_gettop(L);
  723. if (count == 1 && TypeChecker.CheckTypes<UnityEngine.Object>(L, 1))
  724. {
  725. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  726. obj.Destroy();
  727. return 0;
  728. }
  729. else if (count == 1 && TypeChecker.CheckTypes<UnityEngine.GameObject>(L, 1))
  730. {
  731. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
  732. obj.Destroy();
  733. return 0;
  734. }
  735. else
  736. {
  737. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.Destroy");
  738. }
  739. }
  740. catch (Exception e)
  741. {
  742. return LuaDLL.toluaL_exception(L, e);
  743. }
  744. }
  745. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  746. static int DestroyImmediate(IntPtr L)
  747. {
  748. try
  749. {
  750. ToLua.CheckArgsCount(L, 1);
  751. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  752. obj.DestroyImmediate();
  753. return 0;
  754. }
  755. catch (Exception e)
  756. {
  757. return LuaDLL.toluaL_exception(L, e);
  758. }
  759. }
  760. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  761. static int SetMaterialGray(IntPtr L)
  762. {
  763. try
  764. {
  765. int count = LuaDLL.lua_gettop(L);
  766. if (count == 1)
  767. {
  768. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  769. obj.SetMaterialGray();
  770. return 0;
  771. }
  772. else if (count == 2)
  773. {
  774. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  775. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  776. obj.SetMaterialGray(arg0);
  777. return 0;
  778. }
  779. else
  780. {
  781. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SetMaterialGray");
  782. }
  783. }
  784. catch (Exception e)
  785. {
  786. return LuaDLL.toluaL_exception(L, e);
  787. }
  788. }
  789. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  790. static int SetMaterialBlack(IntPtr L)
  791. {
  792. try
  793. {
  794. int count = LuaDLL.lua_gettop(L);
  795. if (count == 1)
  796. {
  797. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  798. obj.SetMaterialBlack();
  799. return 0;
  800. }
  801. else if (count == 2)
  802. {
  803. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  804. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  805. obj.SetMaterialBlack(arg0);
  806. return 0;
  807. }
  808. else
  809. {
  810. return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.GameObject.SetMaterialBlack");
  811. }
  812. }
  813. catch (Exception e)
  814. {
  815. return LuaDLL.toluaL_exception(L, e);
  816. }
  817. }
  818. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  819. static int GetOrAddComponent(IntPtr L)
  820. {
  821. try
  822. {
  823. ToLua.CheckArgsCount(L, 2);
  824. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  825. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  826. UnityEngine.Component o = obj.GetOrAddComponent(arg0);
  827. ToLua.Push(L, o);
  828. return 1;
  829. }
  830. catch (Exception e)
  831. {
  832. return LuaDLL.toluaL_exception(L, e);
  833. }
  834. }
  835. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  836. static int DestroyComponent(IntPtr L)
  837. {
  838. try
  839. {
  840. ToLua.CheckArgsCount(L, 2);
  841. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  842. System.Type arg0 = ToLua.CheckMonoType(L, 2);
  843. obj.DestroyComponent(arg0);
  844. return 0;
  845. }
  846. catch (Exception e)
  847. {
  848. return LuaDLL.toluaL_exception(L, e);
  849. }
  850. }
  851. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  852. static int SetSafeActive(IntPtr L)
  853. {
  854. try
  855. {
  856. ToLua.CheckArgsCount(L, 2);
  857. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  858. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  859. obj.SetSafeActive(arg0);
  860. return 0;
  861. }
  862. catch (Exception e)
  863. {
  864. return LuaDLL.toluaL_exception(L, e);
  865. }
  866. }
  867. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  868. static int Root(IntPtr L)
  869. {
  870. try
  871. {
  872. ToLua.CheckArgsCount(L, 1);
  873. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  874. UnityEngine.GameObject o = obj.Root();
  875. ToLua.PushSealed(L, o);
  876. return 1;
  877. }
  878. catch (Exception e)
  879. {
  880. return LuaDLL.toluaL_exception(L, e);
  881. }
  882. }
  883. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  884. static int Instantiate(IntPtr L)
  885. {
  886. try
  887. {
  888. ToLua.CheckArgsCount(L, 1);
  889. UnityEngine.GameObject obj = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
  890. UnityEngine.Object o = obj.Instantiate();
  891. ToLua.Push(L, o);
  892. return 1;
  893. }
  894. catch (Exception e)
  895. {
  896. return LuaDLL.toluaL_exception(L, e);
  897. }
  898. }
  899. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  900. static int op_Equality(IntPtr L)
  901. {
  902. try
  903. {
  904. ToLua.CheckArgsCount(L, 2);
  905. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  906. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  907. bool o = arg0 == arg1;
  908. LuaDLL.lua_pushboolean(L, o);
  909. return 1;
  910. }
  911. catch (Exception e)
  912. {
  913. return LuaDLL.toluaL_exception(L, e);
  914. }
  915. }
  916. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  917. static int get_transform(IntPtr L)
  918. {
  919. object o = null;
  920. try
  921. {
  922. o = ToLua.ToObject(L, 1);
  923. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  924. UnityEngine.Transform ret = obj.transform;
  925. ToLua.Push(L, ret);
  926. return 1;
  927. }
  928. catch(Exception e)
  929. {
  930. return LuaDLL.toluaL_exception(L, e, o, "attempt to index transform on a nil value");
  931. }
  932. }
  933. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  934. static int get_layer(IntPtr L)
  935. {
  936. object o = null;
  937. try
  938. {
  939. o = ToLua.ToObject(L, 1);
  940. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  941. int ret = obj.layer;
  942. LuaDLL.lua_pushinteger(L, ret);
  943. return 1;
  944. }
  945. catch(Exception e)
  946. {
  947. return LuaDLL.toluaL_exception(L, e, o, "attempt to index layer on a nil value");
  948. }
  949. }
  950. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  951. static int get_activeSelf(IntPtr L)
  952. {
  953. object o = null;
  954. try
  955. {
  956. o = ToLua.ToObject(L, 1);
  957. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  958. bool ret = obj.activeSelf;
  959. LuaDLL.lua_pushboolean(L, ret);
  960. return 1;
  961. }
  962. catch(Exception e)
  963. {
  964. return LuaDLL.toluaL_exception(L, e, o, "attempt to index activeSelf on a nil value");
  965. }
  966. }
  967. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  968. static int get_activeInHierarchy(IntPtr L)
  969. {
  970. object o = null;
  971. try
  972. {
  973. o = ToLua.ToObject(L, 1);
  974. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  975. bool ret = obj.activeInHierarchy;
  976. LuaDLL.lua_pushboolean(L, ret);
  977. return 1;
  978. }
  979. catch(Exception e)
  980. {
  981. return LuaDLL.toluaL_exception(L, e, o, "attempt to index activeInHierarchy on a nil value");
  982. }
  983. }
  984. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  985. static int get_isStatic(IntPtr L)
  986. {
  987. object o = null;
  988. try
  989. {
  990. o = ToLua.ToObject(L, 1);
  991. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  992. bool ret = obj.isStatic;
  993. LuaDLL.lua_pushboolean(L, ret);
  994. return 1;
  995. }
  996. catch(Exception e)
  997. {
  998. return LuaDLL.toluaL_exception(L, e, o, "attempt to index isStatic on a nil value");
  999. }
  1000. }
  1001. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1002. static int get_tag(IntPtr L)
  1003. {
  1004. object o = null;
  1005. try
  1006. {
  1007. o = ToLua.ToObject(L, 1);
  1008. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1009. string ret = obj.tag;
  1010. LuaDLL.lua_pushstring(L, ret);
  1011. return 1;
  1012. }
  1013. catch(Exception e)
  1014. {
  1015. return LuaDLL.toluaL_exception(L, e, o, "attempt to index tag on a nil value");
  1016. }
  1017. }
  1018. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1019. static int get_scene(IntPtr L)
  1020. {
  1021. object o = null;
  1022. try
  1023. {
  1024. o = ToLua.ToObject(L, 1);
  1025. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1026. UnityEngine.SceneManagement.Scene ret = obj.scene;
  1027. ToLua.PushValue(L, ret);
  1028. return 1;
  1029. }
  1030. catch(Exception e)
  1031. {
  1032. return LuaDLL.toluaL_exception(L, e, o, "attempt to index scene on a nil value");
  1033. }
  1034. }
  1035. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1036. static int get_gameObject(IntPtr L)
  1037. {
  1038. object o = null;
  1039. try
  1040. {
  1041. o = ToLua.ToObject(L, 1);
  1042. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1043. UnityEngine.GameObject ret = obj.gameObject;
  1044. ToLua.PushSealed(L, ret);
  1045. return 1;
  1046. }
  1047. catch(Exception e)
  1048. {
  1049. return LuaDLL.toluaL_exception(L, e, o, "attempt to index gameObject on a nil value");
  1050. }
  1051. }
  1052. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1053. static int set_layer(IntPtr L)
  1054. {
  1055. object o = null;
  1056. try
  1057. {
  1058. o = ToLua.ToObject(L, 1);
  1059. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1060. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  1061. obj.layer = arg0;
  1062. return 0;
  1063. }
  1064. catch(Exception e)
  1065. {
  1066. return LuaDLL.toluaL_exception(L, e, o, "attempt to index layer on a nil value");
  1067. }
  1068. }
  1069. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1070. static int set_isStatic(IntPtr L)
  1071. {
  1072. object o = null;
  1073. try
  1074. {
  1075. o = ToLua.ToObject(L, 1);
  1076. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1077. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  1078. obj.isStatic = arg0;
  1079. return 0;
  1080. }
  1081. catch(Exception e)
  1082. {
  1083. return LuaDLL.toluaL_exception(L, e, o, "attempt to index isStatic on a nil value");
  1084. }
  1085. }
  1086. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  1087. static int set_tag(IntPtr L)
  1088. {
  1089. object o = null;
  1090. try
  1091. {
  1092. o = ToLua.ToObject(L, 1);
  1093. UnityEngine.GameObject obj = (UnityEngine.GameObject)o;
  1094. string arg0 = ToLua.CheckString(L, 2);
  1095. obj.tag = arg0;
  1096. return 0;
  1097. }
  1098. catch(Exception e)
  1099. {
  1100. return LuaDLL.toluaL_exception(L, e, o, "attempt to index tag on a nil value");
  1101. }
  1102. }
  1103. }