Beispiel #1
0
        private IEnumerator Start()
        {
            AssetBundleManager abm = new AssetBundleManager();

            abm.SetBaseUri("https://www.example.com/bundles");
            var initializeAsync = abm.InitializeAsync();

            yield return(initializeAsync);

            if (initializeAsync.Success)
            {
                AssetBundleAsync bundle = abm.GetBundleAsync("BundleNameHere");
                yield return(bundle);

                if (bundle.AssetBundle != null)
                {
                    // Do something with the bundle
                    abm.UnloadBundle(bundle.AssetBundle);
                }
            }
            else
            {
                Debug.LogError("Error initializing ABM.");
            }


            abm.Dispose();
        }
Beispiel #2
0
        private IEnumerator Start()
        {
            AssetBundleManager abm = new AssetBundleManager();

            abm.SetBaseUri("https://www.example.com/bundles");
            yield return(abm.InitializeAsync());

            AssetBundleAsync bundle = abm.GetBundleAsync("BundleNameHere");

            yield return(bundle);

            if (bundle.AssetBundle != null)
            {
                // Do something with the bundle
                abm.UnloadBundle(bundle.AssetBundle);
            }

            abm.Dispose();
        }