Table of Contents

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

path string
flags AssetBundleFlags

PackedAssetBundle(string, string)

public PackedAssetBundle(string resourceId, string assemblyName)

Parameters

resourceId string
assemblyName string

Properties

DontCleanupBundleOnDispose

public bool DontCleanupBundleOnDispose { get; set; }

Property Value

bool

DontRefreshBundleChecksumOnDispose

public bool DontRefreshBundleChecksumOnDispose { get; set; }

Property Value

bool

Path

public string Path { get; }

Property Value

string

Methods

ApplyPatch(PackedAssetBundle)

public void ApplyPatch(PackedAssetBundle patchBundle)

Parameters

patchBundle PackedAssetBundle

CalcBundleChecksum(string)

public static int CalcBundleChecksum(string bundlePath)

Parameters

bundlePath string

Returns

int

CleanupBundle()

public void CleanupBundle()

DeleteFile(string)

public override void DeleteFile(string path)

Parameters

path string

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

path string
extension string

Returns

IEnumerable<string>

FileExists(string)

public override bool FileExists(string path)

Parameters

path string

Returns

bool

FromSystemPath(string)

Translates absolute system file path to the asset path. Raises UnsupportedException() for PackedAssetBundle.

public override string FromSystemPath(string systemPath)

Parameters

systemPath string

Returns

string

GetFileAttributes(string)

public override AssetAttributes GetFileAttributes(string path)

Parameters

path string

Returns

AssetAttributes

GetFileContentsHash(string)

Returns SHA256 based on the file contents.

public override SHA256 GetFileContentsHash(string path)

Parameters

path string

Returns

SHA256

GetFileOriginHash(string)

Returns SHA256 that was passed to the ImportFile or ImportFileRaw methods.

public override SHA256 GetFileOriginHash(string path)

Parameters

path string

Returns

SHA256

GetFileSize(string)

public override int GetFileSize(string path)

Parameters

path string

Returns

int

GetFileUnpackedSize(string)

public override int GetFileUnpackedSize(string path)

Parameters

path string

Returns

int

ImportFile(string, Stream, SHA256, AssetAttributes)

public override void ImportFile(string destinationPath, Stream stream, SHA256 originHash, AssetAttributes attributes)

Parameters

destinationPath string
stream Stream
originHash SHA256
attributes AssetAttributes

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

destinationPath string
stream Stream
unpackedSize int
hash SHA256
originHash SHA256
attributes AssetAttributes

IsBundleCorrupted(string)

public static bool IsBundleCorrupted(string bundlePath)

Parameters

bundlePath string

Returns

bool

OpenFile(string, FileMode)

public override Stream OpenFile(string path, FileMode mode = FileMode.Open)

Parameters

path string
mode FileMode

Returns

Stream

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

path string
mode FileMode

Returns

Stream

RefreshBundleChecksum(string)

public static void RefreshBundleChecksum(string bundlePath)

Parameters

bundlePath string

ToSystemPath(string)

Translates bundle path to the asset in the file system. Raises UnsupportedException() for PackedAssetBundle.

public override string ToSystemPath(string bundlePath)

Parameters

bundlePath string

Returns

string