IEnumerator CoLoadStaticAssetFromAssetBundle(string path, ASyncLoadABAssetDelegate callback, params object[] args) { CStaticAssetLoader assetLoader = new CStaticAssetLoader(path); while (!assetLoader.IsFinished) { yield return(null); } if (callback != null) { callback(assetLoader.Asset, args); } }
public static void LoadStaticAsset(string path, ASyncLoadABAssetDelegate callback, params object[] args) { Instance.StartCoroutine(Instance.CoLoadStaticAssetFromAssetBundle(path, callback, args)); }
//加载Asset bundle 并执行回调 public static void LoadAsset(string path, ASyncLoadABAssetDelegate callback, params object[] args) { new XAssetLoader(path, null, callback, args); }