示例#1
0
    public void LoadAssets()
    {
        Action <UnityEngine.Object> callback = (asset) =>
        {
            _IsLoading   = false;
            _AssetBundle = null;

            var bundle = asset as AssetBundle;
            if (bundle == null)
            {
                HobaDebuger.LogError("Failed to load AssetBundle: shaders");
                return;
            }
            _AssetBundle = bundle;
        };

        var bundleName = "shader";

        _IsLoading   = true;
        _AssetBundle = null;
        CAssetBundleManager.AsyncLoadBundle(bundleName, callback);
    }