|
static bool | TryGetAssetBundleData (string assetBundleName, out AssetBundleData data) |
| Attempts to return AssetBundleData for an asset bundle. The AssetBundleManager must be initialized for the manifest data to be available.
|
|
static bool | TryGetAssetRetrievalResult (string assetBundleName, out AssetRetrievalResult result) |
| Gets status of last download attempt for an asset. Note: If an asset was pulled from the cache, it will return 200 with UnityWebRequest.Result.Success. To get the result of the initialization attempt (downloading the manifest), use TryGetAssetManifestRetrievalResult
|
|
static bool | TryGetAssetManifestRetrievalResult (out AssetRetrievalResult result) |
| Gets status of last download attempt of the project asset bundle manifest for this platform. Note: If the plugin is set to use editor assets and this is running in an editor, it will return 200 with UnityWebRequest.Result.Success.
|
|
static async Task< AssetBundleManifest > | GetManifest () |
| Downloads and unpacks the AssetBundleManifest for this platform from the CDN.
|
|
static void | SetSelfInitializerTimeout (float timeInSeconds) |
| Sets a time, in seconds, that the Asset Bundle Manager will attempt to auto-initialize.
|
|
static async void | Initialize () |
| Downloads the project asset bundle manifest for this platform and caches the dependency data. Called automatically on app start unless AutoInitialize is set to false on app awake.
|
|
static async Task< bool > | DoesBucketExist (string bucketId) |
| Uses client-facing Unity Cloud Content Delivery APIto determine if a bucket exists. Requires an internet connection.
|
|
static async Task< string[]> | GetAssetBundleNames (string regexPattern) |
| If runtime, requires plugin to be initialzied and Initialized must be true. Scans manifest for all asset bundle names. If running in the editor with Use Editor Assets checked in the settings, it will scan the project's AssetDatabase
|
|
static async Task< string[]> | GetAssetBundleNames (Type type) |
| If runtime, requires plugin to be initialzied and Initialized must be true. Scans manifest for all asset bundle names. If running in the editor with Use Editor Assets checked in the settings, it will scan the project's AssetDatabase
|
|
static async Task< T > | GetAsset< T > (string name, IProgress< AssetRetrievalProgress > progress=null, Action< T > onSuccess=null, Action< AssetRetrievalResult > onFailure=null, bool waitForInitialize=true) |
| Downloads an asset bundle from the Unity Content Delivery cloud and unpacks the asset.
|
|
static async Task< AssetBundle > | GetAssetBundle (string name, IProgress< AssetRetrievalProgress > progress=null, Action< AssetBundle > onSuccess=null, Action< AssetRetrievalResult > onFailure=null, bool waitForInitialize=true) |
| Downloads an asset bundle from the Unity Content Delivery cloud.
|
|
static async Task | LoadSceneAsssetBundle (string name, IProgress< AssetRetrievalProgress > progress=null, Action onSuccess=null, Action< AssetRetrievalResult > onFailure=null, bool waitForInitialize=true) |
| Downloads a scene asset bundle from the Unity Content Delivery cloud and immediately loads it.
|
|
static async Task | DownloadAndCacheDependencies (string assetBundleName, IProgress< AssetRetrievalProgress > progress=null) |
| Downloads all of an AssetBundle's dependencies and keeps them cached. Good for loading ahead to make downloading a later asset bundle quicker.
|
|
static async Task< List< string > > | GetDependencies (string assetBundleName) |
| Returns all of an asset's dependencies. Does not check Initialized.
|
|
static async Task< List< T > > | GetAllAssetsOfType< T > (IProgress< AssetRetrievalProgress > progress=null) |
| Gets all ScriptableObject assets of a certain type from the CDN.
|
|
static bool | TryGetAssetBundleName (UnityEngine.Object obj, out string assetBundleName) |
| Attempts to retrieve or generate asset bundle name. Will fail if asset type is not defined in EZCDN settings.
|
|
static void | RunCliCommands (List< string > commands, out List< string > output, bool verbose=true) |
| EDITOR ONLY: Will use the included Unity Cloud Content Delivery CLI executable for this Unity Editor platform to execute commands. Refer to the Unity CLI documentation for commands. Note: This will automatically log in with the provided API key in the plugin settings, so there's no need to provide an 'auth login' command. This will also automatically append the current environment id to each command, so there's no need to append –environment [id].
|
|
|
static UnityEvent< string > | AssetRetrievalStarted = new UnityEvent<string>() [get] |
| Fires when GetAsset is called.
|
|
static UnityEvent< string > | AssetLoaded = new UnityEvent<string>() [get] |
| Fires when GetAsset is finished and asset is fully loaded, ready to instantiate. Note: Only fires if the asset is not already loaded. Subsequent calls will not trigger this event unless is called on the data.
|
|
static UnityEvent< string > | AssetBundleDownloadStarted = new UnityEvent<string>() [get] |
| Fires when GetAssetBundle is called.
|
|
static UnityEvent< string > | AssetBundleDownloadFinished = new UnityEvent<string>() [get] |
| Fires when GetAssetBundle is finished and asset bundle has completed downloading. Note that this does not mean the asset has been loaded. Subscribe to AssetLoaded to know when the asset has been loaded.
|
|
static UnityEvent< string > | SceneAssetRetrievalStarted = new UnityEvent<string>() [get] |
| Fires when LoadSceneAssetBundle is called.
|
|
static UnityEvent< string > | SceneAssetLoaded = new UnityEvent<string>() [get] |
| Fires when LoadSceneAssetBundle is finished and scene is fully loaded.
|
|
static bool | AutoInitialize = true [get, set] |
| Set to false to disable the auto initialization (retrieval of AssetBundleManifest and caching dependencies). Note: You must set this to false immedately when the app starts to avoid the first initialization attempt. Best practice would be to use a gameobject that calls awake in the inital scene in the game.
|
|
static bool | IsPackagingAssets [get] |
| Returns true if the Asset Bundle Manager is currently processing and packaging assets on an AssetBundles -> Build command.
|
|
Static class that manages asset bundle retrieval and packaging.