c1_unity/Assets/XLua/Gen/UnityEngine_SceneManagement_SceneWrap.cs
2025-11-03 15:00:43 +08:00

407 lines
14 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 UnityEngineSceneManagementSceneWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(UnityEngine.SceneManagement.Scene);
Utils.BeginObjectRegister(type, L, translator, 1, 4, 8, 2);
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsValid", _m_IsValid);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRootGameObjects", _m_GetRootGameObjects);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashCode", _m_GetHashCode);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Equals", _m_Equals);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "handle", _g_get_handle);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "path", _g_get_path);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "name", _g_get_name);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isLoaded", _g_get_isLoaded);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "buildIndex", _g_get_buildIndex);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isDirty", _g_get_isDirty);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "rootCount", _g_get_rootCount);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isSubScene", _g_get_isSubScene);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "name", _s_set_name);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "isSubScene", _s_set_isSubScene);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
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)
{
translator.Push(L, default(UnityEngine.SceneManagement.Scene));
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SceneManagement.Scene constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __EqMeta(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if (translator.Assignable<UnityEngine.SceneManagement.Scene>(L, 1) && translator.Assignable<UnityEngine.SceneManagement.Scene>(L, 2))
{
UnityEngine.SceneManagement.Scene leftside;translator.Get(L, 1, out leftside);
UnityEngine.SceneManagement.Scene rightside;translator.Get(L, 2, out rightside);
LuaAPI.lua_pushboolean(L, leftside == rightside);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need UnityEngine.SceneManagement.Scene!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_IsValid(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
{
var gen_ret = gen_to_be_invoked.IsValid( );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetRootGameObjects(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 1)
{
var gen_ret = gen_to_be_invoked.GetRootGameObjects( );
translator.Push(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
if(gen_param_count == 2&& translator.Assignable<System.Collections.Generic.List<UnityEngine.GameObject>>(L, 2))
{
System.Collections.Generic.List<UnityEngine.GameObject> _rootGameObjects = (System.Collections.Generic.List<UnityEngine.GameObject>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<UnityEngine.GameObject>));
gen_to_be_invoked.GetRootGameObjects( _rootGameObjects );
translator.Update(L, 1, gen_to_be_invoked);
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.SceneManagement.Scene.GetRootGameObjects!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetHashCode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
{
var gen_ret = gen_to_be_invoked.GetHashCode( );
LuaAPI.xlua_pushinteger(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Equals(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
{
object _other = translator.GetObject(L, 2, typeof(object));
var gen_ret = gen_to_be_invoked.Equals( _other );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_handle(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.handle);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_path(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.path);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_name(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.name);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_isLoaded(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isLoaded);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_buildIndex(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.buildIndex);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_isDirty(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isDirty);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_rootCount(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.rootCount);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_isSubScene(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isSubScene);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_name(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.name = LuaAPI.lua_tostring(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_isSubScene(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.SceneManagement.Scene gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.isSubScene = LuaAPI.lua_toboolean(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}