#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class AssetSourceWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(AssetSource);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 10, 10);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "allFromEditor", _g_get_allFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "audioFromEditor", _g_get_audioFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "effectFromEditor", _g_get_effectFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "mobFromEditor", _g_get_mobFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "refdataFromEditor", _g_get_refdataFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "sceneFromEditor", _g_get_sceneFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "shaderFromEditor", _g_get_shaderFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "uiFromEditor", _g_get_uiFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "builtInFromEditor", _g_get_builtInFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "luaFromEditor", _g_get_luaFromEditor);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "allFromEditor", _s_set_allFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "audioFromEditor", _s_set_audioFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "effectFromEditor", _s_set_effectFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "mobFromEditor", _s_set_mobFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "refdataFromEditor", _s_set_refdataFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "sceneFromEditor", _s_set_sceneFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "shaderFromEditor", _s_set_shaderFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "uiFromEditor", _s_set_uiFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "builtInFromEditor", _s_set_builtInFromEditor);
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "luaFromEditor", _s_set_luaFromEditor);
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
AssetSource gen_ret = new AssetSource();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to AssetSource constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_allFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.allFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_audioFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.audioFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_effectFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.effectFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_mobFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.mobFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_refdataFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.refdataFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_sceneFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.sceneFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_shaderFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.shaderFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_uiFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.uiFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_builtInFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.builtInFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_luaFromEditor(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, AssetSource.luaFromEditor);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_allFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.allFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_audioFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.audioFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_effectFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.effectFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_mobFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.mobFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_refdataFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.refdataFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_sceneFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.sceneFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_shaderFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.shaderFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_uiFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.uiFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_builtInFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.builtInFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_luaFromEditor(RealStatePtr L)
|
{
|
try {
|
|
AssetSource.luaFromEditor = LuaAPI.lua_toboolean(L, 1);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|