Class PackedAssetBundle
- Namespace
- Lime
- Assembly
- Lime.dll
public class PackedAssetBundle : AssetBundle, IDisposable
- Inheritance
-
PackedAssetBundle
- Implements
- Inherited Members
Constructors
PackedAssetBundle(string, AssetBundleFlags)
public PackedAssetBundle(string path, AssetBundleFlags flags = AssetBundleFlags.None)
Parameters
pathstringflagsAssetBundleFlags
PackedAssetBundle(string, string)
public PackedAssetBundle(string resourceId, string assemblyName)
Parameters
Properties
DontCleanupBundleOnDispose
public bool DontCleanupBundleOnDispose { get; set; }
Property Value
DontRefreshBundleChecksumOnDispose
public bool DontRefreshBundleChecksumOnDispose { get; set; }
Property Value
Path
public string Path { get; }
Property Value
Methods
ApplyPatch(PackedAssetBundle)
public void ApplyPatch(PackedAssetBundle patchBundle)
Parameters
patchBundlePackedAssetBundle
CalcBundleChecksum(string)
public static int CalcBundleChecksum(string bundlePath)
Parameters
bundlePathstring
Returns
CleanupBundle()
public void CleanupBundle()
DeleteFile(string)
public override void DeleteFile(string path)
Parameters
pathstring
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
EnumerateFiles(string, string)
Enumerates all files by given path and having the given extension. Order is specific to implementation.
public override IEnumerable<string> EnumerateFiles(string path = null, string extension = null)
Parameters
Returns
FileExists(string)
public override bool FileExists(string path)
Parameters
pathstring
Returns
FromSystemPath(string)
Translates absolute system file path to the asset path. Raises UnsupportedException() for PackedAssetBundle.
public override string FromSystemPath(string systemPath)
Parameters
systemPathstring
Returns
GetFileAttributes(string)
public override AssetAttributes GetFileAttributes(string path)
Parameters
pathstring
Returns
GetFileContentsHash(string)
Returns SHA256 based on the file contents.
public override SHA256 GetFileContentsHash(string path)
Parameters
pathstring
Returns
GetFileOriginHash(string)
Returns SHA256 that was passed to the ImportFile or ImportFileRaw methods.
public override SHA256 GetFileOriginHash(string path)
Parameters
pathstring
Returns
GetFileSize(string)
public override int GetFileSize(string path)
Parameters
pathstring
Returns
GetFileUnpackedSize(string)
public override int GetFileUnpackedSize(string path)
Parameters
pathstring
Returns
ImportFile(string, Stream, SHA256, AssetAttributes)
public override void ImportFile(string destinationPath, Stream stream, SHA256 originHash, AssetAttributes attributes)
Parameters
destinationPathstringstreamStreamoriginHashSHA256attributesAssetAttributes
ImportFileRaw(string, Stream, int, SHA256, SHA256, AssetAttributes)
Imports a file assuming that the input stream is already compressed.
public override void ImportFileRaw(string destinationPath, Stream stream, int unpackedSize, SHA256 hash, SHA256 originHash, AssetAttributes attributes)
Parameters
destinationPathstringstreamStreamunpackedSizeinthashSHA256originHashSHA256attributesAssetAttributes
IsBundleCorrupted(string)
public static bool IsBundleCorrupted(string bundlePath)
Parameters
bundlePathstring
Returns
OpenFile(string, FileMode)
public override Stream OpenFile(string path, FileMode mode = FileMode.Open)
Parameters
Returns
OpenFileRaw(string, FileMode)
Returns file data as it stored in the asset bundle, e.g. compressed.
public override Stream OpenFileRaw(string path, FileMode mode = FileMode.Open)
Parameters
Returns
RefreshBundleChecksum(string)
public static void RefreshBundleChecksum(string bundlePath)
Parameters
bundlePathstring
ToSystemPath(string)
Translates bundle path to the asset in the file system. Raises UnsupportedException() for PackedAssetBundle.
public override string ToSystemPath(string bundlePath)
Parameters
bundlePathstring