Show / Hide Table of Contents

Class AssetCollection

A collection of IUnityObjectBase assets.

Inheritance
System.Object
AssetCollection
SerializedAssetCollection
VirtualAssetCollection
Namespace: AssetRipper.Assets.Collections
Assembly: AssetRipper.Assets.dll
Syntax
public abstract class AssetCollection : IReadOnlyCollection<IUnityObjectBase>

Constructors

| Improve this Doc View Source

AssetCollection(Bundle)

Declaration
protected AssetCollection(Bundle bundle)
Parameters
Type Name Description
Bundle bundle

Properties

| Improve this Doc View Source

Assets

Declaration
public IReadOnlyDictionary<long, IUnityObjectBase> Assets { get; }
Property Value
Type Description
IReadOnlyDictionary<System.Int64, IUnityObjectBase>
| Improve this Doc View Source

Bundle

Declaration
public Bundle Bundle { get; }
Property Value
Type Description
Bundle
| Improve this Doc View Source

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Dependencies

The list of dependencies for this collection.

Declaration
public IReadOnlyList<AssetCollection> Dependencies { get; }
Property Value
Type Description
IReadOnlyList<AssetCollection>
Remarks

The zeroth entry is langword_csharp_this for correct correspondence with file indices. Entries are null if they could not be found.

| Improve this Doc View Source

EndianType

Declaration
public EndianType EndianType { get; protected set; }
Property Value
Type Description
AssetRipper.IO.Endian.EndianType
| Improve this Doc View Source

FilePath

Declaration
public string FilePath { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Flags

Declaration
public TransferInstructionFlags Flags { get; protected set; }
Property Value
Type Description
TransferInstructionFlags
| Improve this Doc View Source

IsScene

Declaration
public bool IsScene { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

Declaration
public string Name { get; protected set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Platform

Declaration
public BuildTarget Platform { get; protected set; }
Property Value
Type Description
AssetRipper.IO.Files.BuildTarget
| Improve this Doc View Source

Scene

Declaration
public SceneDefinition Scene { get; }
Property Value
Type Description
SceneDefinition
| Improve this Doc View Source

Version

Declaration
public UnityVersion Version { get; protected set; }
Property Value
Type Description
UnityVersion

Methods

| Improve this Doc View Source

AddAsset(IUnityObjectBase)

Declaration
protected void AddAsset(IUnityObjectBase asset)
Parameters
Type Name Description
IUnityObjectBase asset
| Improve this Doc View Source

AddDependency(AssetCollection)

Declaration
public int AddDependency(AssetCollection dependency)
Parameters
Type Name Description
AssetCollection dependency
Returns
Type Description
System.Int32
| Improve this Doc View Source

CreatePPtr<T>(T)

Declaration
public PPtr<T> CreatePPtr<T>(T asset)
    where T : IUnityObjectBase
Parameters
Type Name Description
T asset
Returns
Type Description
PPtr<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

ForceCreatePPtr<T>(T)

Declaration
public PPtr<T> ForceCreatePPtr<T>(T asset)
    where T : IUnityObjectBase
Parameters
Type Name Description
T asset
Returns
Type Description
PPtr<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

GetEnumerator()

Declaration
public IEnumerator<IUnityObjectBase> GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator<IUnityObjectBase>
| Improve this Doc View Source

IsCompatibleDependency(AssetCollection)

Determines if the given dependency collection is referencable from this collection.

Declaration
protected virtual bool IsCompatibleDependency(AssetCollection dependency)
Parameters
Type Name Description
AssetCollection dependency
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ReplaceAsset(IUnityObjectBase)

Replace an asset in this collection.

Declaration
public void ReplaceAsset(IUnityObjectBase replacement)
Parameters
Type Name Description
IUnityObjectBase replacement
Remarks

This is useful for switching the underlying implementation, such as for version changing.

| Improve this Doc View Source

SetDependency(Int32, AssetCollection)

Declaration
protected void SetDependency(int index, AssetCollection collection)
Parameters
Type Name Description
System.Int32 index
AssetCollection collection
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
| Improve this Doc View Source

TryGetAsset(PPtr)

Declaration
public IUnityObjectBase TryGetAsset(PPtr pptr)
Parameters
Type Name Description
AssetRipper.Assets.Metadata.PPtr pptr
Returns
Type Description
IUnityObjectBase
| Improve this Doc View Source

TryGetAsset(PPtr, out IUnityObjectBase)

Declaration
public bool TryGetAsset(PPtr pptr, out IUnityObjectBase asset)
Parameters
Type Name Description
AssetRipper.Assets.Metadata.PPtr pptr
IUnityObjectBase asset
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetAsset(Int32, Int64)

Declaration
public IUnityObjectBase TryGetAsset(int fileIndex, long pathID)
Parameters
Type Name Description
System.Int32 fileIndex
System.Int64 pathID
Returns
Type Description
IUnityObjectBase
| Improve this Doc View Source

TryGetAsset(Int32, Int64, out IUnityObjectBase)

Declaration
public bool TryGetAsset(int fileIndex, long pathID, out IUnityObjectBase asset)
Parameters
Type Name Description
System.Int32 fileIndex
System.Int64 pathID
IUnityObjectBase asset
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetAsset(Int64)

Declaration
public IUnityObjectBase TryGetAsset(long pathID)
Parameters
Type Name Description
System.Int64 pathID
Returns
Type Description
IUnityObjectBase
| Improve this Doc View Source

TryGetAsset(Int64, out IUnityObjectBase)

Declaration
public bool TryGetAsset(long pathID, out IUnityObjectBase asset)
Parameters
Type Name Description
System.Int64 pathID
IUnityObjectBase asset
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetAsset<T>(PPtr<T>)

Declaration
public T TryGetAsset<T>(PPtr<T> pptr)
    where T : IUnityObjectBase
Parameters
Type Name Description
PPtr<T> pptr
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

TryGetAsset<T>(PPtr<T>, out T)

Declaration
public bool TryGetAsset<T>(PPtr<T> pptr, out T asset)
    where T : IUnityObjectBase
Parameters
Type Name Description
PPtr<T> pptr
T asset
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

TryGetAsset<T>(Int32, Int64)

Declaration
public T TryGetAsset<T>(int fileIndex, long pathID)
    where T : IUnityObjectBase
Parameters
Type Name Description
System.Int32 fileIndex
System.Int64 pathID
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

TryGetAsset<T>(Int32, Int64, out T)

Declaration
public bool TryGetAsset<T>(int fileIndex, long pathID, out T asset)
    where T : IUnityObjectBase
Parameters
Type Name Description
System.Int32 fileIndex
System.Int64 pathID
T asset
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
| Improve this Doc View Source

TryGetAsset<T>(Int64)

Declaration
public T TryGetAsset<T>(long pathID)
    where T : IUnityObjectBase
Parameters
Type Name Description
System.Int64 pathID
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

TryGetAsset<T>(Int64, out T)

Declaration
public bool TryGetAsset<T>(long pathID, out T asset)
    where T : IUnityObjectBase
Parameters
Type Name Description
System.Int64 pathID
T asset
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Extension Methods

PathExtensions.GetPath(AssetCollection)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾