Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
UnityManifest Class Reference

Detailed Description

Use Unity's bundle manifest directly

Not recommended in production, it's not efficient. Prefer PackedManifest.

Inheritance diagram for UnityManifest:
IBundleManifest

Classes

class   Loader
 
class   Settings
 

Public Member Functions

bool  IsReady (BundleManager manager)
 
bool  AmountToDownload (BundleManager manager, string sanitizedLabel, out uint totalSize, out uint alreadyDownloaded)
 
IEnumerator  StartBundle (BundleManager manager, string sanitizedLabel)
 
bool  TryLookupBundle (BundleManager manager, string sanitizedLabel, out string outUrl, out Hash128 outHash, out string outCrc)
 
bool  TryGetDependencies (BundleManager manager, string sanitizedLabel, out IEnumerable< string > outRequiredSanitizedLabelList)
 
string  GetStreamingAssetsName (BundleManager manager, string sanitizedLabel, string url)
 

Static Public Member Functions

static string  SanitizeBundleName (string assetBundleName, bool bundleNamesHaveHash)
 
static SpecificBundleName  RemapBundleName_WithHash (string assetBundleName, AssetBundleManifest manifest, string[] activeVariants)
 
static SpecificBundleName  RemapVariantName_NoHash (string assetBundleName, AssetBundleManifest manifest, string[] activeVariants)
 
static string  EscapeBundleName (string source)
 

Static Public Attributes

static ILogger  Logger
 

Protected Member Functions

Hash128  GetHashForAssetBundle (SpecificBundleName bundleName)
 

Member Function Documentation

◆ AmountToDownload()

bool AmountToDownload ( BundleManager  manager,
string  sanitizedLabel,
out uint  totalSize,
out uint  alreadyDownloaded 
)
inline

How much is needed to download this?

Parameters
manager Target manager
sanitizedLabel Requested bundle
totalSize How big the bundle is, regardless of how much has been downloaded
alreadyDownloaded How much still needs to be downloaded.
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 IBundleManifest.

◆ GetStreamingAssetsName()

string GetStreamingAssetsName ( BundleManager  manager,
string  sanitizedLabel,
string  url 
)
inline

Figure out what name to check for in StreamingAssets data for a given URL.

In most cases this will remove the baseURL from the url this object calculated.

Parameters
manager Target manager
sanitizedLabel Requested bundle
url from TryLookupBundle.outUrl
Returns
filename

Implements IBundleManifest.

◆ IsReady()

bool IsReady ( BundleManager  manager )
inline

Ready for requests?

Once ready, presumed always ready.

Implements IBundleManifest.

◆ RemapBundleName_WithHash()

static SpecificBundleName RemapBundleName_WithHash ( string  assetBundleName,
AssetBundleManifest  manifest,
string[]  activeVariants 
)
inlinestatic

Remaps the asset bundle name to the best fitting asset bundle.

◆ RemapVariantName_NoHash()

static SpecificBundleName RemapVariantName_NoHash ( string  assetBundleName,
AssetBundleManifest  manifest,
string[]  activeVariants 
)
inlinestatic

Remaps the asset bundle name to the best fitting asset bundle variant.

◆ SanitizeBundleName()

static string SanitizeBundleName ( string  assetBundleName,
bool  bundleNamesHaveHash 
)
inlinestatic

Make requested bundle names consistent

This removes any variant or hash keys.

◆ StartBundle()

IEnumerator StartBundle ( BundleManager  manager,
string  sanitizedLabel 
)
inline

Do any pre-load tasks for a bundle that might take time.

Parameters
manager Target manager
sanitizedLabel Requested bundle

Implements IBundleManifest.

◆ TryGetDependencies()

bool TryGetDependencies ( BundleManager  manager,
string  sanitizedLabel,
out IEnumerable< string >  outRequiredSanitizedLabelList 
)
inline

What does this bundle depend on?

Parameters
manager Target manager
sanitizedLabel Requested bundle
outRequiredSanitizedLabelList List of sanitized bundle names that will be needed.
Returns
was bundle found?

Implements IBundleManifest.

◆ TryLookupBundle()

bool TryLookupBundle ( BundleManager  manager,
string  sanitizedLabel,
out string  outUrl,
out Hash128  outHash,
out string  outCrc 
)
inline

Gather load-time info about bundle.

Parameters
manager Target manager
sanitizedLabel Requested bundle
outUrl Pass to WWW for download
outHash Pass to WWW for download
outCrc Pass to WWW for download
Returns
was bundle found?

Implements IBundleManifest.

Member Data Documentation

◆ Logger

ILogger Logger
static

Assign a logging handler