예제 #1
0
    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);
        }
    }
예제 #2
0
 public static void LoadStaticAsset(string path, ASyncLoadABAssetDelegate callback, params object[] args)
 {
     Instance.StartCoroutine(Instance.CoLoadStaticAssetFromAssetBundle(path, callback, args));
 }
예제 #3
0
 //加载Asset bundle 并执行回调
 public static void LoadAsset(string path, ASyncLoadABAssetDelegate callback, params object[] args)
 {
     new XAssetLoader(path, null, callback, args);
 }