public void CreateObjectAsync(string resName, CreateObjectCallback callback) { PackageItem pi; if (!_itemsByName.TryGetValue(resName, out pi)) { Debug.LogError("FairyGUI: resource not found - " + resName + " in " + this.name); return; } AsyncCreationHelper.CreateObject(pi, callback); }
public static void CreateObjectFromURL(string url, CreateObjectCallback callback) { PackageItem pi = GetItemByURL(url); if (pi != null) { AsyncCreationHelper.CreateObject(pi, callback); } else { Debug.LogError("FairyGUI: resource not found - " + url); } }