public static PackageItem GetItemByURL(string url) { if (url.Length > 13) { string pkgId = url.Substring(5, 8); string srcId = url.Substring(13); UIPackage pkg = GetById(pkgId); if (pkg != null) return pkg.GetItem(srcId); } return null; }
/// <summary> /// /// </summary> protected void LoadContent() { ClearContent(); if (string.IsNullOrEmpty(_url)) { return; } _contentItem = UIPackage.GetItemByURL(_url); if (_contentItem != null) { _contentItem = _contentItem.getBranch(); _contentItem = _contentItem.getHighResolution(); _contentItem.Load(); if (_contentItem.type == PackageItemType.Spine) { #if FAIRYGUI_SPINE LoadSpine(); #endif } else if (_contentItem.type == PackageItemType.DragoneBones) { #if FAIRYGUI_DRAGONBONES LoadDragonBones(); #endif } } else { LoadExternal(); } }