Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
PackedManifest Class Reference

Optimized version of UnityEngine.AssetBundleManifest that includes bundle sizes More...

Inheritance diagram for PackedManifest:
IBundleDirectory

Classes

class   Loader
 

Public Member Functions

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...
 
string  GetStreamingAssetsName (BundleManager manager, string sanitizedLabel, string url)
  Figure out what name to check for in StreamingAssets data for a given URL. More...
 
bool  TryGetDependencies (BundleManager manager, string sanitizedLabel, out IEnumerable< string > outRequiredSanitizedLabelList)
  What does this bundle depend on? More...
 
Exception  Init (AssetBundleManifest manifest, bool bundleNamesHaveHash, string searchFolder)
 

Static Public Member Functions

static PackedManifest  Alloc ()
 

Static Public Attributes

const string  DirectoryAssetName = "BundleDirectory"
 
const string  DirectoryBundleName = "directory-packed-manifest"
 

Properties

string[]  ActiveVariants [get, set]
  The list of bundle variants we should try to load More...
 

Detailed Description

Member Function Documentation

◆ AmountToDownload()

bool AmountToDownload ( BundleManager  manager,
string  sanitizedLabel,
out uint  totalSize,
out uint  alreadyDownloaded 
)
Parameters
manager
sanitizedLabel
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
sanitizedLabel
url
Returns

Implements IBundleDirectory.

◆ IsReady()

bool IsReady ( BundleManager  manager )

Once ready, presumed always ready. Please remember to wait for UnityEngine.Caching.ready before making network requests.

Implements IBundleDirectory.

◆ StartBundle()

IEnumerator StartBundle ( BundleManager  manager,
string  sanitizedLabel 
)
Parameters
manager
Returns

Implements IBundleDirectory.

◆ 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.

Property Documentation

◆ ActiveVariants

string [] ActiveVariants
getset

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. Setting to null is an optimization to avoid needing to lookup variants.