Class Bundle
A container for AssetCollections, ResourceFiles, and other Bundles.
Namespace: AssetRipper.Assets.Bundles
Assembly: AssetRipper.Assets.dll
Syntax
public abstract class Bundle : IDisposable
Properties
| Improve this Doc View SourceBundles
The list of child Bundles in this Bundle.
Declaration
public IReadOnlyList<Bundle> Bundles { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Bundle> |
Collections
The list of AssetCollections in this Bundle.
Declaration
public IReadOnlyList<AssetCollection> Collections { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<AssetCollection> |
FailedFiles
The list of FailedFiles in this Bundle.
Declaration
public IReadOnlyList<FailedFile> FailedFiles { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<FailedFile> |
Name
The name of this Bundle.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Parent
The parent Bundle of this Bundle.
Declaration
public Bundle Parent { get; }
Property Value
Type | Description |
---|---|
Bundle |
Resources
The list of ResourceFiles in this Bundle.
Declaration
public IReadOnlyList<ResourceFile> Resources { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ResourceFile> |
Scenes
All the SceneDefinitions in this bundle.
Declaration
public IEnumerable<SceneDefinition> Scenes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SceneDefinition> |
Methods
| Improve this Doc View SourceAddBundle(Bundle)
Adds a child Bundle to this Bundle.
Declaration
public void AddBundle(Bundle bundle)
Parameters
Type | Name | Description |
---|---|---|
Bundle | bundle | The Bundle to add. |
AddCollection(AssetCollection)
Adds an AssetCollection to this Bundle.
Declaration
public void AddCollection(AssetCollection collection)
Parameters
Type | Name | Description |
---|---|---|
AssetCollection | collection | The AssetCollection to add. |
AddCollectionFromSerializedFile(SerializedFile, AssetFactoryBase, UnityVersion)
Declaration
public SerializedAssetCollection AddCollectionFromSerializedFile(SerializedFile file, AssetFactoryBase factory, UnityVersion defaultVersion = null)
Parameters
Type | Name | Description |
---|---|---|
SerializedFile | file | |
AssetFactoryBase | factory | |
UnityVersion | defaultVersion |
Returns
Type | Description |
---|---|
SerializedAssetCollection |
AddFailed(FailedFile)
Declaration
public void AddFailed(FailedFile file)
Parameters
Type | Name | Description |
---|---|---|
FailedFile | file |
AddResource(ResourceFile)
Adds a ResourceFile to this Bundle.
Declaration
public void AddResource(ResourceFile resource)
Parameters
Type | Name | Description |
---|---|---|
ResourceFile | resource | The ResourceFile to add. |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
FetchAssetCollections()
Fetches all AssetCollections in the hierarchy of this Bundle.
Declaration
public IEnumerable<AssetCollection> FetchAssetCollections()
Returns
Type | Description |
---|---|
IEnumerable<AssetCollection> | An IEnumerable of all AssetCollections in the hierarchy. |
FetchAssets()
Fetches all IUnityObjectBases in this Bundle.
Declaration
public IEnumerable<IUnityObjectBase> FetchAssets()
Returns
Type | Description |
---|---|
IEnumerable<IUnityObjectBase> | An IEnumerable of all IUnityObjectBases in this Bundle. |
FetchAssetsInHierarchy()
Fetches all IUnityObjectBases in the hierarchy of this Bundle.
Declaration
public IEnumerable<IUnityObjectBase> FetchAssetsInHierarchy()
Returns
Type | Description |
---|---|
IEnumerable<IUnityObjectBase> | An IEnumerable of all IUnityObjectBases in the hierarchy. |
FetchResourceFiles()
Declaration
public IEnumerable<ResourceFile> FetchResourceFiles()
Returns
Type | Description |
---|---|
IEnumerable<ResourceFile> |
GetRoot()
Gets the root Bundle of this Bundle.
Declaration
public Bundle GetRoot()
Returns
Type | Description |
---|---|
Bundle | The root Bundle of this Bundle. |
IsCompatibleBundle(Bundle)
Indicates if the specified Bundle is compatible with this Bundle.
Declaration
protected virtual bool IsCompatibleBundle(Bundle bundle)
Parameters
Type | Name | Description |
---|---|---|
Bundle | bundle | The Bundle to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the Bundle is compatible, else false. |
IsCompatibleCollection(AssetCollection)
Indicates if the specified AssetCollection is compatible with this Bundle.
Declaration
protected virtual bool IsCompatibleCollection(AssetCollection collection)
Parameters
Type | Name | Description |
---|---|---|
AssetCollection | collection | The AssetCollection to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the AssetCollection is compatible, else false. |
ResolveCollection(FileIdentifier)
Resolves an AssetCollection with the specified name in this Bundle and its ascendants.
Declaration
public AssetCollection ResolveCollection(FileIdentifier identifier)
Parameters
Type | Name | Description |
---|---|---|
FileIdentifier | identifier | The identifier of the file of the AssetCollection. |
Returns
Type | Description |
---|---|
AssetCollection | The resolved AssetCollection if it exists, else null. |
ResolveCollection(String)
Resolves an AssetCollection with the specified name in this Bundle and its ascendants.
Declaration
public AssetCollection ResolveCollection(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the AssetCollection. |
Returns
Type | Description |
---|---|
AssetCollection | The resolved AssetCollection if it exists, else null. |
ResolveExternalResource(String)
Declaration
protected virtual ResourceFile ResolveExternalResource(string originalName)
Parameters
Type | Name | Description |
---|---|---|
System.String | originalName |
Returns
Type | Description |
---|---|
ResourceFile |
ResolveResource(String)
Resolves a ResourceFile with the specified name in this Bundle and its ascendants.
Declaration
public ResourceFile ResolveResource(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the ResourceFile. |
Returns
Type | Description |
---|---|
ResourceFile | The resolved ResourceFile if it exists, else null. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |