Home › Page › ExternalAssetManager

ExternalAssetManager

Revision for “ExternalAssetManager” created on 17 April, 2013 @ 19:07

Title
ExternalAssetManager
Content
Inherits from SingletonScript. ExternalAssetManager is a singleton that helps to orchestrate the caching of external assets. ExternalAssetManager uses both an external and local manifest file to keep track of differences in file versions. When a version difference is detected, it will download the new version and save it to local cache on the disk. ExternalAssetManager requires asset to be designated and prepared in the editor using the ExternalAssetManagerWindow. This window can be accessed by the "Window-&gt;External Asset Manager" menu option. See the ExternalAssetManagerWindow tutorial for more information. [table caption="Variables" colwidth="20%|20%"] name, type, description externalManifestURL, string, The URL to download the external manifest file. [/table] [table caption="Class Functions" colwidth="20%|20%"] name, type, description GetPath, string, Returns the local path to an asset. CheckForUpdatedAsset, void, Checks if a new version of an asset needs downloaded. [/table] <strong>Using ExternalAssetManager in Script</strong> [sourcecode language="csharp"]static public string GetPath(string assetName)[/sourcecode] Given an asset name, this function returns a local path to an asset (or null if there are no local versions of the asset,) and then will check if a new version of the asset exists on the external server.  If a new version is found, a download will be launched.  Note that this function immediately returns a local path before downloading any new version.  The new version will be available the next time GetPath is called. [sourcecode language="csharp"]public void CheckForUpdatedAsset(string assetName)[/sourcecode] Given an asset name, this function checks if a new version of the asset exists on the external server.  If a new version is found, a download will be launched.
Excerpt


OldNewDate CreatedAuthorActions
17 April, 2013 @ 19:07 admin
17 April, 2013 @ 19:07 admin
29 March, 2013 @ 20:12 [Autosave] admin
29 March, 2013 @ 20:10 admin
29 March, 2013 @ 19:50 admin
29 March, 2013 @ 18:29 admin
29 March, 2013 @ 18:29 admin