#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 UILoaderWrap  
 | 
    { 
 | 
        public static void __Register(RealStatePtr L) 
 | 
        { 
 | 
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
            System.Type type = typeof(UILoader); 
 | 
            Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); 
 | 
             
 | 
             
 | 
             
 | 
             
 | 
             
 | 
             
 | 
            Utils.EndObjectRegister(type, L, translator, null, null, 
 | 
                null, null, null); 
 | 
  
 | 
            Utils.BeginClassRegister(type, L, __CreateInstance, 10, 0, 0); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadWindow", _m_LoadWindow_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadWindowAsync", _m_LoadWindowAsync_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadWindowAsset", _m_UnLoadWindowAsset_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadPrefab", _m_LoadPrefab_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadPrefab", _m_UnLoadPrefab_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadSprite", _m_LoadSprite_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadSprite", _m_UnLoadSprite_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadFont", _m_LoadFont_xlua_st_); 
 | 
            Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadFont", _m_UnLoadFont_xlua_st_); 
 | 
             
 | 
             
 | 
             
 | 
             
 | 
             
 | 
             
 | 
            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) 
 | 
                { 
 | 
                     
 | 
                    UILoader gen_ret = new UILoader(); 
 | 
                    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 UILoader constructor!"); 
 | 
             
 | 
        } 
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_LoadWindow_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __name = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                        UnityEngine.GameObject gen_ret = UILoader.LoadWindow( __name ); 
 | 
                        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_LoadWindowAsync_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __name = LuaAPI.lua_tostring(L, 1); 
 | 
                    System.Action<bool, UnityEngine.Object> __callBack = translator.GetDelegate<System.Action<bool, UnityEngine.Object>>(L, 2); 
 | 
                     
 | 
                    UILoader.LoadWindowAsync( __name, __callBack ); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 0; 
 | 
                } 
 | 
                 
 | 
            } catch(System.Exception gen_e) { 
 | 
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e); 
 | 
            } 
 | 
             
 | 
        } 
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_UnLoadWindowAsset_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __assetName = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                    UILoader.UnLoadWindowAsset( __assetName ); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 0; 
 | 
                } 
 | 
                 
 | 
            } catch(System.Exception gen_e) { 
 | 
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e); 
 | 
            } 
 | 
             
 | 
        } 
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_LoadPrefab_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __name = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                        UnityEngine.GameObject gen_ret = UILoader.LoadPrefab( __name ); 
 | 
                        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_UnLoadPrefab_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __assetName = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                    UILoader.UnLoadPrefab( __assetName ); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 0; 
 | 
                } 
 | 
                 
 | 
            } catch(System.Exception gen_e) { 
 | 
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e); 
 | 
            } 
 | 
             
 | 
        } 
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_LoadSprite_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
             
 | 
             
 | 
             
 | 
                int gen_param_count = LuaAPI.lua_gettop(L); 
 | 
             
 | 
                if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))  
 | 
                { 
 | 
                    string __iconKey = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                        UnityEngine.Sprite gen_ret = UILoader.LoadSprite( __iconKey ); 
 | 
                        translator.Push(L, gen_ret); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 1; 
 | 
                } 
 | 
                if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))  
 | 
                { 
 | 
                    string __folder = LuaAPI.lua_tostring(L, 1); 
 | 
                    string __file = LuaAPI.lua_tostring(L, 2); 
 | 
                     
 | 
                        UnityEngine.Sprite gen_ret = UILoader.LoadSprite( __folder, __file ); 
 | 
                        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 UILoader.LoadSprite!"); 
 | 
             
 | 
        } 
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_UnLoadSprite_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __iconKey = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                    UILoader.UnLoadSprite( __iconKey ); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 0; 
 | 
                } 
 | 
                 
 | 
            } catch(System.Exception gen_e) { 
 | 
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e); 
 | 
            } 
 | 
             
 | 
        } 
 | 
         
 | 
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 
 | 
        static int _m_LoadFont_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __fontName = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                        UnityEngine.Font gen_ret = UILoader.LoadFont( __fontName ); 
 | 
                        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_UnLoadFont_xlua_st_(RealStatePtr L) 
 | 
        { 
 | 
            try { 
 | 
             
 | 
             
 | 
             
 | 
                 
 | 
                { 
 | 
                    string __fontName = LuaAPI.lua_tostring(L, 1); 
 | 
                     
 | 
                    UILoader.UnLoadFont( __fontName ); 
 | 
                     
 | 
                     
 | 
                     
 | 
                    return 0; 
 | 
                } 
 | 
                 
 | 
            } catch(System.Exception gen_e) { 
 | 
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e); 
 | 
            } 
 | 
             
 | 
        } 
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
         
 | 
    } 
 | 
} 
 |