|
|
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
-
- public class UnityEngine_TextAssetWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(UnityEngine.TextAsset), typeof(UnityEngine.Object));
- L.RegFunction("ToString", ToString);
- L.RegFunction("New", _CreateUnityEngine_TextAsset);
- L.RegFunction("__eq", op_Equality);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("text", get_text, null);
- L.RegVar("bytes", get_bytes, null);
- L.EndClass();
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateUnityEngine_TextAsset(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 0)
- {
- UnityEngine.TextAsset obj = new UnityEngine.TextAsset();
- ToLua.Push(L, obj);
- return 1;
- }
- else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
- {
- string arg0 = ToLua.CheckString(L, 1);
- UnityEngine.TextAsset obj = new UnityEngine.TextAsset(arg0);
- ToLua.Push(L, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.TextAsset.New");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToString(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- UnityEngine.TextAsset obj = (UnityEngine.TextAsset)ToLua.CheckObject(L, 1, typeof(UnityEngine.TextAsset));
- string o = obj.ToString();
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Equality(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
- UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
- bool o = arg0 == arg1;
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_text(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.TextAsset obj = (UnityEngine.TextAsset)o;
- string ret = obj.text;
- LuaDLL.lua_pushstring(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_bytes(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- UnityEngine.TextAsset obj = (UnityEngine.TextAsset)o;
- byte[] ret = obj.bytes;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index bytes on a nil value" : e.Message);
- }
- }
- }
-
|