public static GameObject GetGameObjectInstance(string abPath, string assetName) { if (abManager != null) { GameObject gameObject = abManager.LoadAsset(abPath, assetName); if (gameObject != null) { return(GameObject.Instantiate(gameObject)); } } return(null); }
static int _m_LoadAsset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ABManager gen_to_be_invoked = (ABManager)translator.FastGetCSObj(L, 1); { string _fullPath = LuaAPI.lua_tostring(L, 2); AssetItem gen_ret = gen_to_be_invoked.LoadAsset(_fullPath); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }