215 lines
7.2 KiB
C#
215 lines
7.2 KiB
C#
#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 UnityEngineSubsystemManagerWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.SubsystemManager);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 6, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAllSubsystemDescriptors", _m_GetAllSubsystemDescriptors_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "beforeReloadSubsystems", _e_beforeReloadSubsystems);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "afterReloadSubsystems", _e_afterReloadSubsystems);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "reloadSubsytemsStarted", _e_reloadSubsytemsStarted);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "reloadSubsytemsCompleted", _e_reloadSubsytemsCompleted);
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
return LuaAPI.luaL_error(L, "UnityEngine.SubsystemManager does not have a constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetAllSubsystemDescriptors_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
System.Collections.Generic.List<UnityEngine.ISubsystemDescriptor> _descriptors = (System.Collections.Generic.List<UnityEngine.ISubsystemDescriptor>)translator.GetObject(L, 1, typeof(System.Collections.Generic.List<UnityEngine.ISubsystemDescriptor>));
|
|
|
|
UnityEngine.SubsystemManager.GetAllSubsystemDescriptors( _descriptors );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_beforeReloadSubsystems(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.SubsystemManager.beforeReloadSubsystems += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.SubsystemManager.beforeReloadSubsystems -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SubsystemManager.beforeReloadSubsystems!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_afterReloadSubsystems(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.SubsystemManager.afterReloadSubsystems += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.SubsystemManager.afterReloadSubsystems -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SubsystemManager.afterReloadSubsystems!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_reloadSubsytemsStarted(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.SubsystemManager.reloadSubsytemsStarted += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.SubsystemManager.reloadSubsytemsStarted -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SubsystemManager.reloadSubsytemsStarted!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_reloadSubsytemsCompleted(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.SubsystemManager.reloadSubsytemsCompleted += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.SubsystemManager.reloadSubsytemsCompleted -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SubsystemManager.reloadSubsytemsCompleted!");
|
|
}
|
|
|
|
}
|
|
}
|