static int GetItemAsset(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.UIPackage), typeof(string))) { FairyGUI.UIPackage obj = (FairyGUI.UIPackage)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); object o = obj.GetItemAsset(arg0); ToLua.Push(L, o); return(1); } else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string))) { string arg0 = ToLua.ToString(L, 1); string arg1 = ToLua.ToString(L, 2); object o = FairyGUI.UIPackage.GetItemAsset(arg0, arg1); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.UIPackage.GetItemAsset")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// Get a asset with a certain name. /// </summary> /// <param name="pkgName">Package name.</param> /// <param name="resName">Resource name.</param> /// <returns>If resource is atlas, returns NTexture; If resource is sound, returns AudioClip.</returns> public static object GetItemAsset(string pkgName, string resName) { UIPackage pkg = GetByName(pkgName); if (pkg != null) return pkg.GetItemAsset(resName); else return null; }
/// <summary> /// Get a asset with a certain name. /// </summary> /// <param name="pkgName">Package name.</param> /// <param name="resName">Resource name.</param> /// <returns>If resource is atlas, returns NTexture; If resource is sound, returns AudioClip.</returns> public static object GetItemAsset(string pkgName, string resName) { UIPackage pkg = GetByName(pkgName); if (pkg != null) { return(pkg.GetItemAsset(resName)); } else { return(null); } }
static public int GetItemAsset(IntPtr l) { try { FairyGUI.UIPackage self = (FairyGUI.UIPackage)checkSelf(l); System.String a1; checkType(l, 2, out a1); var ret = self.GetItemAsset(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
public object Load() { return(owner.GetItemAsset(this)); }