Use Unity's bundle manifest directly
More...
|
AssetBundleLoadOperation |
Initialize (BundleManager manager, string absolutePath, int version, string baseUrl) |
|
Sets the source URL to the manifest and where all remote content is expected to be found. More...
|
|
bool |
IsReady (BundleManager manager) |
|
Ready for requests? More...
|
|
bool |
AmountToDownload (BundleManager manager, string sanitizedLabel, out uint totalSize, out uint alreadyDownloaded) |
|
How much is needed to download this? More...
|
|
IEnumerator |
StartBundle (BundleManager manager, string sanitizedLabel) |
|
Do any pre-load tasks for a bundle that might take time. More...
|
|
bool |
TryLookupBundle (BundleManager manager, string sanitizedLabel, out string outUrl, out Hash128 outHash, out string outCrc) |
|
Gather load-time info about bundle. More...
|
|
bool |
TryGetDependencies (BundleManager manager, string sanitizedLabel, out IEnumerable< string > outRequiredSanitizedLabelList) |
|
What does this bundle depend on? More...
|
|
string |
GetStreamingAssetsName (BundleManager manager, string sanitizedLabel, string url) |
|
Figure out what name to check for in StreamingAssets data for a given URL. More...
|
|
|
bool |
escapeUrls = false |
|
should we escape bundle names when making urls? More...
|
|
bool |
bundleNamesHaveHash = true |
|
Were the asset bundles created with the BuildAssetBundleOptions.AppendHashToAssetBundleName on? More...
|
|
|
string |
baseDownloadingURL |
|
Not recommended in production, it's not efficient. Prefer PackedManifest.
◆ AmountToDownload()
bool AmountToDownload |
( |
BundleManager |
manager, |
|
|
string |
sanitizedLabel, |
|
|
out uint |
totalSize, |
|
|
out uint |
alreadyDownloaded |
|
) |
|
|
- Parameters
-
- Returns
- Was bundle found?
This will be called before StartBundle!
Return only this bundle's size. Caller will handle dependencies. This does require determining specific bundle to download, and if it's cached.
Implements IBundleDirectory.
◆ GetStreamingAssetsName()
string GetStreamingAssetsName |
( |
BundleManager |
manager, |
|
|
string |
sanitizedLabel, |
|
|
string |
url |
|
) |
|
|
In most cases this will remove the baseURL from the url this object calculated.
- Parameters
-
- Returns
Implements IBundleDirectory.
◆ Initialize()
Can be updated during application run for a version change.
- Parameters
-
version |
If cached locally and version number matches, won't hit network |
absolutePath |
manifest path. Not necessarily from baseUrl |
baseUrl |
prepended to all bundle requests. Ends with slash. Typically BundleManager.GetUrlPath(absolutePath). |
Implements IBundleDirectoryLoader.
◆ IsReady()
◆ RemapBundleName_WithHash()
static SpecificBundleName RemapBundleName_WithHash |
( |
string |
assetBundleName, |
|
|
AssetBundleManifest |
manifest, |
|
|
string[] |
activeVariants |
|
) |
|
|
|
static |
◆ RemapVariantName_NoHash()
static SpecificBundleName RemapVariantName_NoHash |
( |
string |
assetBundleName, |
|
|
AssetBundleManifest |
manifest, |
|
|
string[] |
activeVariants |
|
) |
|
|
|
static |
◆ SanitizeBundleName()
static string SanitizeBundleName |
( |
string |
assetBundleName, |
|
|
bool |
bundleNamesHaveHash |
|
) |
|
|
|
static |
◆ StartBundle()
IEnumerator StartBundle |
( |
BundleManager |
manager, |
|
|
string |
sanitizedLabel |
|
) |
|
|
◆ TryGetDependencies()
bool TryGetDependencies |
( |
BundleManager |
manager, |
|
|
string |
sanitizedLabel, |
|
|
out IEnumerable< string > |
outRequiredSanitizedLabelList |
|
) |
|
|
- Parameters
-
sanitizedLabel |
|
outRequiredSanitizedLabelList |
|
- Returns
- was bundle found?
Implements IBundleDirectory.
◆ TryLookupBundle()
bool TryLookupBundle |
( |
BundleManager |
manager, |
|
|
string |
sanitizedLabel, |
|
|
out string |
outUrl, |
|
|
out Hash128 |
outHash, |
|
|
out string |
outCrc |
|
) |
|
|
- Parameters
-
sanitizedLabel |
|
outUrl |
|
outHash |
|
outCrc |
|
- Returns
- was bundle found?
Implements IBundleDirectory.
◆ bundleNamesHaveHash
bool bundleNamesHaveHash = true |
◆ escapeUrls
Proper naming makes this unnecessary, and doing so slows down loading.
◆ Logger
◆ ActiveDirectory
Only valid after Initialize completes without error.
◆ ActiveVariants
In highest to lowest priority order. Ignored for any bundle without a variant. Changes only affect bundles loaded in the future, not already loaded ones.