Main/Assets/GameAssets/Resources/GameUI/XLua/Gen/LuaAssetUtilsWrap.cs
2025-01-25 04:38:09 +08:00

583 lines
20 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 LuaAssetUtilsWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(LuaAssetUtils);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 18, 0, 0);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPlayerBoneIndex", _m_GetPlayerBoneIndex_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAssetFullPath", _m_GetAssetFullPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAudioFilePath", _m_GetAudioFilePath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetVideoFilePath", _m_GetVideoFilePath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAnimationPath", _m_GetAnimationPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsUIRes", _m_IsUIRes_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetModelTypeOutIndex", _m_GetModelTypeOutIndex_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetModelType", _m_GetModelType_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetModelAssetPath", _m_GetModelAssetPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPlaceHolderModelAssetPath", _m_GetPlaceHolderModelAssetPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetImageAssetPath", _m_GetImageAssetPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetImageTypeCode", _m_GetImageTypeCode_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsVFXImagePath", _m_IsVFXImagePath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "ProcessPath", _m_ProcessPath_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPathWithOutExt", _m_GetPathWithOutExt_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFileNameWithOutExt", _m_GetFileNameWithOutExt_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "MakeFileNameToLower", _m_MakeFileNameToLower_xlua_st_);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
LuaAssetUtils gen_ret = new LuaAssetUtils();
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 LuaAssetUtils constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetPlayerBoneIndex_xlua_st_(RealStatePtr L)
{
try {
{
int _modelID = LuaAPI.xlua_tointeger(L, 1);
int gen_ret = LuaAssetUtils.GetPlayerBoneIndex( _modelID );
LuaAPI.xlua_pushinteger(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_GetAssetFullPath_xlua_st_(RealStatePtr L)
{
try {
{
string _relatePath = LuaAPI.lua_tostring(L, 1);
string _extension = LuaAPI.lua_tostring(L, 2);
string gen_ret = LuaAssetUtils.GetAssetFullPath( _relatePath, _extension );
LuaAPI.lua_pushstring(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_GetAudioFilePath_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
{
string _name = LuaAPI.lua_tostring(L, 1);
Thousandto.Core.Asset.AudioTypeCode _code;if (LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TNUMBER)_code = (Thousandto.Core.Asset.AudioTypeCode)LuaAPI.lua_tonumber(L, 2);else translator.Get(L, 2, out _code);
string gen_ret = LuaAssetUtils.GetAudioFilePath( _name, _code );
LuaAPI.lua_pushstring(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_GetVideoFilePath_xlua_st_(RealStatePtr L)
{
try {
{
string _name = LuaAPI.lua_tostring(L, 1);
string gen_ret = LuaAssetUtils.GetVideoFilePath( _name );
LuaAPI.lua_pushstring(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_GetAnimationPath_xlua_st_(RealStatePtr L)
{
try {
{
string _ownerTypr = LuaAPI.lua_tostring(L, 1);
string _boneIndex = LuaAPI.lua_tostring(L, 2);
string _animClipName = LuaAPI.lua_tostring(L, 3);
string gen_ret = LuaAssetUtils.GetAnimationPath( _ownerTypr, _boneIndex, _animClipName );
LuaAPI.lua_pushstring(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_IsUIRes_xlua_st_(RealStatePtr L)
{
try {
{
string _filePath = LuaAPI.lua_tostring(L, 1);
bool gen_ret = LuaAssetUtils.IsUIRes( _filePath );
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_GetModelTypeOutIndex_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
{
string _modelName = LuaAPI.lua_tostring(L, 1);
int _idx;
Thousandto.Core.Asset.ModelTypeCode gen_ret = LuaAssetUtils.GetModelTypeOutIndex( _modelName, out _idx );
translator.PushThousandtoCoreAssetModelTypeCode(L, gen_ret);
LuaAPI.xlua_pushinteger(L, _idx);
return 2;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetModelType_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
{
string _modelName = LuaAPI.lua_tostring(L, 1);
Thousandto.Core.Asset.ModelTypeCode gen_ret = LuaAssetUtils.GetModelType( _modelName );
translator.PushThousandtoCoreAssetModelTypeCode(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_GetModelAssetPath_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 3&& (translator.Assignable<Thousandto.Core.Asset.ModelTypeCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
{
Thousandto.Core.Asset.ModelTypeCode _type;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_type = (Thousandto.Core.Asset.ModelTypeCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _type);
int _code = LuaAPI.xlua_tointeger(L, 2);
bool _isShow = LuaAPI.lua_toboolean(L, 3);
string gen_ret = LuaAssetUtils.GetModelAssetPath( _type, _code, _isShow );
LuaAPI.lua_pushstring(L, gen_ret);
return 1;
}
if(gen_param_count == 2&& (translator.Assignable<Thousandto.Core.Asset.ModelTypeCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
Thousandto.Core.Asset.ModelTypeCode _type;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_type = (Thousandto.Core.Asset.ModelTypeCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _type);
int _code = LuaAPI.xlua_tointeger(L, 2);
string gen_ret = LuaAssetUtils.GetModelAssetPath( _type, _code );
LuaAPI.lua_pushstring(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 LuaAssetUtils.GetModelAssetPath!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetPlaceHolderModelAssetPath_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 2&& (translator.Assignable<Thousandto.Core.Asset.ModelTypeCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
Thousandto.Core.Asset.ModelTypeCode _type;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_type = (Thousandto.Core.Asset.ModelTypeCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _type);
int _param = LuaAPI.xlua_tointeger(L, 2);
string gen_ret = LuaAssetUtils.GetPlaceHolderModelAssetPath( _type, _param );
LuaAPI.lua_pushstring(L, gen_ret);
return 1;
}
if(gen_param_count == 1&& (translator.Assignable<Thousandto.Core.Asset.ModelTypeCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)))
{
Thousandto.Core.Asset.ModelTypeCode _type;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_type = (Thousandto.Core.Asset.ModelTypeCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _type);
string gen_ret = LuaAssetUtils.GetPlaceHolderModelAssetPath( _type );
LuaAPI.lua_pushstring(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 LuaAssetUtils.GetPlaceHolderModelAssetPath!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetImageAssetPath_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
{
Thousandto.Core.Asset.ImageTypeCode _code;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_code = (Thousandto.Core.Asset.ImageTypeCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _code);
string _name = LuaAPI.lua_tostring(L, 2);
string gen_ret = LuaAssetUtils.GetImageAssetPath( _code, _name );
LuaAPI.lua_pushstring(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_GetImageTypeCode_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
{
string _texPath = LuaAPI.lua_tostring(L, 1);
Thousandto.Core.Asset.ImageTypeCode gen_ret = LuaAssetUtils.GetImageTypeCode( _texPath );
translator.PushThousandtoCoreAssetImageTypeCode(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_IsVFXImagePath_xlua_st_(RealStatePtr L)
{
try {
{
string _texPath = LuaAPI.lua_tostring(L, 1);
bool gen_ret = LuaAssetUtils.IsVFXImagePath( _texPath );
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_ProcessPath_xlua_st_(RealStatePtr L)
{
try {
{
string _path = LuaAPI.lua_tostring(L, 1);
string gen_ret = LuaAssetUtils.ProcessPath( _path );
LuaAPI.lua_pushstring(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_GetPathWithOutExt_xlua_st_(RealStatePtr L)
{
try {
{
string _path = LuaAPI.lua_tostring(L, 1);
string gen_ret = LuaAssetUtils.GetPathWithOutExt( _path );
LuaAPI.lua_pushstring(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_GetFileNameWithOutExt_xlua_st_(RealStatePtr L)
{
try {
{
string _path = LuaAPI.lua_tostring(L, 1);
string gen_ret = LuaAssetUtils.GetFileNameWithOutExt( _path );
LuaAPI.lua_pushstring(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_MakeFileNameToLower_xlua_st_(RealStatePtr L)
{
try {
{
string _path = LuaAPI.lua_tostring(L, 1);
string gen_ret = LuaAssetUtils.MakeFileNameToLower( _path );
LuaAPI.lua_pushstring(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
}
}