public static UIAtlas GetLevelAtlas(string atlasname) { string path = XGamePath.GetAtlasPath(atlasname); GameObject go = Load <GameObject>(path); UIAtlas ua = go.GetComponent <UIAtlas>(); return(ua); }
public static void GetAtlasAsync(string atlasname, Action <UIAtlas> callback) { string path = XGamePath.GetAtlasPath(atlasname); LoadAsync <GameObject>(path, (o) => { Log(Tag, "GetAtlasAsync", path); UIAtlas ua = o.GetComponent <UIAtlas>(); callback(ua); }); }