1163 lines
41 KiB
C#
1163 lines
41 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 UnityEngineApplicationWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.Application);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 23, 30, 3);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Quit", _m_Quit_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Unload", _m_Unload_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "CanStreamedLevelBeLoaded", _m_CanStreamedLevelBeLoaded_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsPlaying", _m_IsPlaying_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetBuildTags", _m_GetBuildTags_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetBuildTags", _m_SetBuildTags_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "HasProLicense", _m_HasProLicense_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RequestAdvertisingIdentifierAsync", _m_RequestAdvertisingIdentifierAsync_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "OpenURL", _m_OpenURL_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetStackTraceLogType", _m_GetStackTraceLogType_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetStackTraceLogType", _m_SetStackTraceLogType_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RequestUserAuthorization", _m_RequestUserAuthorization_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "HasUserAuthorization", _m_HasUserAuthorization_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "lowMemory", _e_lowMemory);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "logMessageReceived", _e_logMessageReceived);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "logMessageReceivedThreaded", _e_logMessageReceivedThreaded);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onBeforeRender", _e_onBeforeRender);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "focusChanged", _e_focusChanged);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "deepLinkActivated", _e_deepLinkActivated);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "wantsToQuit", _e_wantsToQuit);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "quitting", _e_quitting);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "unloading", _e_unloading);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isPlaying", _g_get_isPlaying);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isFocused", _g_get_isFocused);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "buildGUID", _g_get_buildGUID);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "runInBackground", _g_get_runInBackground);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isBatchMode", _g_get_isBatchMode);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "dataPath", _g_get_dataPath);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "streamingAssetsPath", _g_get_streamingAssetsPath);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "persistentDataPath", _g_get_persistentDataPath);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "temporaryCachePath", _g_get_temporaryCachePath);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "absoluteURL", _g_get_absoluteURL);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "unityVersion", _g_get_unityVersion);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "version", _g_get_version);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "installerName", _g_get_installerName);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "identifier", _g_get_identifier);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "installMode", _g_get_installMode);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "sandboxType", _g_get_sandboxType);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "productName", _g_get_productName);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "companyName", _g_get_companyName);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "cloudProjectId", _g_get_cloudProjectId);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "targetFrameRate", _g_get_targetFrameRate);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "consoleLogPath", _g_get_consoleLogPath);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "backgroundLoadingPriority", _g_get_backgroundLoadingPriority);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "genuine", _g_get_genuine);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "genuineCheckAvailable", _g_get_genuineCheckAvailable);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "platform", _g_get_platform);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isMobilePlatform", _g_get_isMobilePlatform);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isConsolePlatform", _g_get_isConsolePlatform);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "systemLanguage", _g_get_systemLanguage);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "internetReachability", _g_get_internetReachability);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "isEditor", _g_get_isEditor);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "runInBackground", _s_set_runInBackground);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "targetFrameRate", _s_set_targetFrameRate);
|
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "backgroundLoadingPriority", _s_set_backgroundLoadingPriority);
|
|
|
|
|
|
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)
|
|
{
|
|
|
|
var gen_ret = new UnityEngine.Application();
|
|
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 UnityEngine.Application constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Quit_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 0)
|
|
{
|
|
|
|
UnityEngine.Application.Quit( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
|
{
|
|
int _exitCode = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
UnityEngine.Application.Quit( _exitCode );
|
|
|
|
|
|
|
|
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.Application.Quit!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Unload_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
UnityEngine.Application.Unload( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CanStreamedLevelBeLoaded_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
|
{
|
|
int _levelIndex = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
var gen_ret = UnityEngine.Application.CanStreamedLevelBeLoaded( _levelIndex );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _levelName = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = UnityEngine.Application.CanStreamedLevelBeLoaded( _levelName );
|
|
LuaAPI.lua_pushboolean(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 UnityEngine.Application.CanStreamedLevelBeLoaded!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsPlaying_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|
|
|
var gen_ret = UnityEngine.Application.IsPlaying( _obj );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetBuildTags_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = UnityEngine.Application.GetBuildTags( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetBuildTags_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
string[] _buildTags = (string[])translator.GetObject(L, 1, typeof(string[]));
|
|
|
|
UnityEngine.Application.SetBuildTags( _buildTags );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_HasProLicense_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = UnityEngine.Application.HasProLicense( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RequestAdvertisingIdentifierAsync_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Application.AdvertisingIdentifierCallback _delegateMethod = translator.GetDelegate<UnityEngine.Application.AdvertisingIdentifierCallback>(L, 1);
|
|
|
|
var gen_ret = UnityEngine.Application.RequestAdvertisingIdentifierAsync( _delegateMethod );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OpenURL_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
string _url = LuaAPI.lua_tostring(L, 1);
|
|
|
|
UnityEngine.Application.OpenURL( _url );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetStackTraceLogType_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.LogType _logType;translator.Get(L, 1, out _logType);
|
|
|
|
var gen_ret = UnityEngine.Application.GetStackTraceLogType( _logType );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetStackTraceLogType_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.LogType _logType;translator.Get(L, 1, out _logType);
|
|
UnityEngine.StackTraceLogType _stackTraceType;translator.Get(L, 2, out _stackTraceType);
|
|
|
|
UnityEngine.Application.SetStackTraceLogType( _logType, _stackTraceType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RequestUserAuthorization_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UserAuthorization _mode;translator.Get(L, 1, out _mode);
|
|
|
|
var gen_ret = UnityEngine.Application.RequestUserAuthorization( _mode );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_HasUserAuthorization_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UserAuthorization _mode;translator.Get(L, 1, out _mode);
|
|
|
|
var gen_ret = UnityEngine.Application.HasUserAuthorization( _mode );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isPlaying(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isPlaying);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isFocused(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isFocused);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_buildGUID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.buildGUID);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_runInBackground(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.runInBackground);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isBatchMode(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isBatchMode);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_dataPath(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.dataPath);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_streamingAssetsPath(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.streamingAssetsPath);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_persistentDataPath(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.persistentDataPath);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_temporaryCachePath(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.temporaryCachePath);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_absoluteURL(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.absoluteURL);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_unityVersion(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.unityVersion);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_version(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.version);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_installerName(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.installerName);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_identifier(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.identifier);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_installMode(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, UnityEngine.Application.installMode);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_sandboxType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, UnityEngine.Application.sandboxType);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_productName(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.productName);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_companyName(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.companyName);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_cloudProjectId(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.cloudProjectId);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_targetFrameRate(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.xlua_pushinteger(L, UnityEngine.Application.targetFrameRate);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_consoleLogPath(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushstring(L, UnityEngine.Application.consoleLogPath);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_backgroundLoadingPriority(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, UnityEngine.Application.backgroundLoadingPriority);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_genuine(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.genuine);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_genuineCheckAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.genuineCheckAvailable);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_platform(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.PushUnityEngineRuntimePlatform(L, UnityEngine.Application.platform);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isMobilePlatform(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isMobilePlatform);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isConsolePlatform(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isConsolePlatform);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_systemLanguage(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.PushUnityEngineSystemLanguage(L, UnityEngine.Application.systemLanguage);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_internetReachability(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.PushUnityEngineNetworkReachability(L, UnityEngine.Application.internetReachability);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_isEditor(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, UnityEngine.Application.isEditor);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_runInBackground(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
UnityEngine.Application.runInBackground = 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_targetFrameRate(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
UnityEngine.Application.targetFrameRate = LuaAPI.xlua_tointeger(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_backgroundLoadingPriority(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
UnityEngine.ThreadPriority gen_value;translator.Get(L, 1, out gen_value);
|
|
UnityEngine.Application.backgroundLoadingPriority = gen_value;
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_lowMemory(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
UnityEngine.Application.LowMemoryCallback gen_delegate = translator.GetDelegate<UnityEngine.Application.LowMemoryCallback>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need UnityEngine.Application.LowMemoryCallback!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.lowMemory += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.lowMemory -= 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.Application.lowMemory!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_logMessageReceived(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
UnityEngine.Application.LogCallback gen_delegate = translator.GetDelegate<UnityEngine.Application.LogCallback>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need UnityEngine.Application.LogCallback!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.logMessageReceived += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.logMessageReceived -= 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.Application.logMessageReceived!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_logMessageReceivedThreaded(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
UnityEngine.Application.LogCallback gen_delegate = translator.GetDelegate<UnityEngine.Application.LogCallback>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need UnityEngine.Application.LogCallback!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.logMessageReceivedThreaded += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.logMessageReceivedThreaded -= 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.Application.logMessageReceivedThreaded!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onBeforeRender(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
UnityEngine.Events.UnityAction gen_delegate = translator.GetDelegate<UnityEngine.Events.UnityAction>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need UnityEngine.Events.UnityAction!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.onBeforeRender += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.onBeforeRender -= 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.Application.onBeforeRender!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_focusChanged(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<bool> gen_delegate = translator.GetDelegate<System.Action<bool>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<bool>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.focusChanged += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.focusChanged -= 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.Application.focusChanged!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_deepLinkActivated(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<string> gen_delegate = translator.GetDelegate<System.Action<string>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<string>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.deepLinkActivated += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.deepLinkActivated -= 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.Application.deepLinkActivated!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_wantsToQuit(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Func<bool> gen_delegate = translator.GetDelegate<System.Func<bool>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Func<bool>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
UnityEngine.Application.wantsToQuit += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.wantsToQuit -= 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.Application.wantsToQuit!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_quitting(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.Application.quitting += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.quitting -= 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.Application.quitting!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_unloading(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.Application.unloading += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
UnityEngine.Application.unloading -= 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.Application.unloading!");
|
|
}
|
|
|
|
}
|
|
}
|