FPackageIndex

Namespace: UAssetAPI.UnrealTypes

Wrapper for index into an ImportMap or ExportMap.

Values greater than zero indicate that this is an index into the ExportMap. The actual array index will be (FPackageIndex - 1).

Values less than zero indicate that this is an index into the ImportMap. The actual array index will be (-FPackageIndex - 1)

public class FPackageIndex

Inheritance ObjectFPackageIndex

Fields

Index

Values greater than zero indicate that this is an index into the ExportMap. The actual array index will be (FPackageIndex - 1).

Values less than zero indicate that this is an index into the ImportMap. The actual array index will be (-FPackageIndex - 1)

public int Index;

Constructors

FPackageIndex(Int32)

public FPackageIndex(int index)

Parameters

index Int32

FPackageIndex(AssetBinaryReader)

public FPackageIndex(AssetBinaryReader reader)

Parameters

reader AssetBinaryReader

Methods

FromRawIndex(Int32)

Returns an FPackageIndex based off of the index provided. Equivalent to FPackageIndex.FPackageIndex(Int32).

public static FPackageIndex FromRawIndex(int index)

Parameters

index Int32
The index to create a new FPackageIndex with.

Returns

FPackageIndex
A new FPackageIndex with the index provided.

IsImport()

Returns true if this is an index into the import map.

public bool IsImport()

Returns

Boolean
true if this is an index into the import map, false otherwise

IsExport()

Returns true if this is an index into the export map.

public bool IsExport()

Returns

Boolean
true if this is an index into the export map, false otherwise

IsNull()

Return true if this represents null (i.e. neither an import nor an export)

public bool IsNull()

Returns

Boolean
true if this index represents null, false otherwise

FromImport(Int32)

Creates a FPackageIndex from an index in the import map.

public static FPackageIndex FromImport(int importIndex)

Parameters

importIndex Int32
An import index to create an FPackageIndex from.

Returns

FPackageIndex
An FPackageIndex created from the import index.

Exceptions

InvalidOperationException
Thrown when the provided import index is less than zero.

FromExport(Int32)

Creates a FPackageIndex from an index in the export map.

public static FPackageIndex FromExport(int exportIndex)

Parameters

exportIndex Int32
An export index to create an FPackageIndex from.

Returns

FPackageIndex
An FPackageIndex created from the export index.

Exceptions

InvalidOperationException
Thrown when the provided export index is less than zero.

ToImport(UnrealPackage)

Check that this is an import index and return the corresponding import.

public Import ToImport(UnrealPackage asset)

Parameters

asset UnrealPackage
The asset that this index is used in.

Returns

Import
The import that this index represents in the import map.

Exceptions

InvalidOperationException
Thrown when this is not an index into the import map.

ToExport(UnrealPackage)

Check that this is an export index and return the corresponding export.

public Export ToExport(UnrealPackage asset)

Parameters

asset UnrealPackage
The asset that this index is used in.

Returns

Export
The export that this index represents in the the export map.

Exceptions

InvalidOperationException
Thrown when this is not an index into the export map.

ToExport<T>(UnrealPackage)

public T ToExport<T>(UnrealPackage asset)

Type Parameters

T

Parameters

asset UnrealPackage

Returns

T

Equals(Object)

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

public int GetHashCode()

Returns

Int32

ToString()

public string ToString()

Returns

String

Write(AssetBinaryWriter)

public int Write(AssetBinaryWriter writer)

Parameters

writer AssetBinaryWriter

Returns

Int32