UAsset

Namespace: UAssetAPI

Represents an Unreal Engine asset.

public class UAsset : INameMap

Inheritance ObjectUAsset
Implements INameMap

Fields

Info

Agent string to provide context in serialized JSON.

public string Info;

FilePath

The path of the file on disk that this asset represents. This does not need to be specified for regular parsing.

public string FilePath;

Mappings

The corresponding mapping data for the game that this asset is from. Optional unless unversioned properties are present.

public Usmap Mappings;

CustomSerializationFlags

List of custom serialization flags, used to override certain optional behavior in how UAssetAPI serializes assets.

public CustomSerializationFlags CustomSerializationFlags;

UseSeparateBulkDataFiles

Should the asset be split into separate .uasset, .uexp, and .ubulk files, as opposed to one single .uasset file?

public bool UseSeparateBulkDataFiles;

IsUnversioned

Should this asset not serialize its engine and custom versions?

public bool IsUnversioned;

FileVersionLicenseeUE

The licensee file version. Used by some games to add their own Engine-level versioning.

public int FileVersionLicenseeUE;

ObjectVersion

The object version of UE4 that will be used to parse this asset.

public ObjectVersion ObjectVersion;

ObjectVersionUE5

The object version of UE5 that will be used to parse this asset. Set to ObjectVersionUE5.UNKNOWN for UE4 games.

public ObjectVersionUE5 ObjectVersionUE5;

CustomVersionContainer

All the custom versions stored in the archive.

public List<CustomVersion> CustomVersionContainer;

GatherableTextData

Map of the gatherable text data.

public List<FGatherableTextData> GatherableTextData;

Exports

Map of object exports. UAssetAPI used to call these "categories."

public List<Export> Exports;

SearchableNames

List of Searchable Names, by object containing them. Sorted to keep order consistent.

public SortedDictionary<FPackageIndex, List<FName>> SearchableNames;

Thumbnails

Map of object full names to the thumbnails

public Dictionary<string, FObjectThumbnail> Thumbnails;

WorldTileInfo

Tile information used by WorldComposition. Defines properties necessary for tile positioning in the world.

public FWorldTileInfo WorldTileInfo;

MapStructTypeOverride

In MapProperties that have StructProperties as their keys or values, there is no universal, context-free way to determine the type of the struct.

To that end, this dictionary maps MapProperty names to the type of the structs within them (tuple of key struct type and value struct type) if they are not None-terminated property lists.

public Dictionary<string, Tuple<FString, FString>> MapStructTypeOverride;

ArrayStructTypeOverride

IN ENGINE VERSIONS BEFORE ObjectVersion.VER_UE4_INNER_ARRAY_TAG_INFO:

In ArrayProperties that have StructProperties as their keys or values, there is no universal, context-free way to determine the type of the struct. To that end, this dictionary maps ArrayProperty names to the type of the structs within them.

public Dictionary<string, FString> ArrayStructTypeOverride;

OtherAssetsFailedToAccess

public ISet<FName> OtherAssetsFailedToAccess;

LegacyFileVersion

The package file version number when this package was saved.

public int LegacyFileVersion;

Remarks:

The lower 16 bits stores the UE3 engine version, while the upper 16 bits stores the UE4/licensee version. For newer packages this is -7. VersionDescription-2indicates presence of enum-based custom versions-3indicates guid-based custom versions-4indicates removal of the UE3 version. Packages saved with this ID cannot be loaded in older engine versions-5indicates the replacement of writing out the "UE3 version" so older versions of engine can gracefully fail to open newer packages-6indicates optimizations to how custom versions are being serialized-7indicates the texture allocation info has been removed from the summary-8indicates that the UE5 version has been added to the summary

DataResourceVersion

The version to use for serializing data resources.

public EObjectDataResourceVersion DataResourceVersion;

DataResources

List of serialized UObject binary/bulk data resources.

public List<FObjectDataResource> DataResources;

UsesEventDrivenLoader

Whether or not this asset is loaded with the Event Driven Loader.

public bool UsesEventDrivenLoader;

WillSerializeNameHashes

Whether or not this asset serializes hashes in the name map. If null, this will be automatically determined based on the object version.

public Nullable<bool> WillSerializeNameHashes;

Imports

Map of object imports. UAssetAPI used to call these "links."

public List<Import> Imports;

DependsMap

List of dependency lists for each export.

public List<Int32[]> DependsMap;

SoftPackageReferenceList

List of packages that are soft referenced by this package.

public List<FString> SoftPackageReferenceList;

AssetRegistryData

Uncertain

public Byte[] AssetRegistryData;

BulkData

Any bulk data that is not stored in the export map.

public Byte[] BulkData;

ValorantGarbageData

Some garbage data that appears to be present in certain games (e.g. Valorant)

public Byte[] ValorantGarbageData;

SeaOfThievesGarbageData

Some garbage data that appears to be present in certain games (e.g. Sea of Thieves) null = not present empty array = present, but serialize as offset = 0, length = 0

public Byte[] SeaOfThievesGarbageData;

Generations

Data about previous versions of this package.

public List<FGenerationInfo> Generations;

PackageGuid

Current ID for this package. Effectively unused.

public Guid PackageGuid;

PersistentGuid

Current persistent ID for this package.

public Guid PersistentGuid;

RecordedEngineVersion

Engine version this package was saved with. This may differ from CompatibleWithEngineVersion for assets saved with a hotfix release.

public FEngineVersion RecordedEngineVersion;

RecordedCompatibleWithEngineVersion

Engine version this package is compatible with. Assets saved by Hotfix releases and engine versions that maintain binary compatibility will have a CompatibleWithEngineVersion.Patch that matches the original release (as opposed to SavedByEngineVersion which will have a patch version of the new release).

public FEngineVersion RecordedCompatibleWithEngineVersion;

ChunkIDs

Streaming install ChunkIDs

public Int32[] ChunkIDs;

PackageSource

Value that is used by the Unreal Engine to determine if the package was saved by Epic, a licensee, modder, etc.

public uint PackageSource;

FolderName

In UE4: "FolderName": The Generic Browser folder name that this package lives in. Usually "None" in cooked assets. In UE5: "PackageName": The package name the file was last saved with.

public FString FolderName;

OverrideNameMapHashes

A map of name map entries to hashes to use when serializing instead of the default engine hash algorithm. Useful when external programs improperly specify name map hashes and binary equality must be maintained.

public Dictionary<FString, uint> OverrideNameMapHashes;

LocalizationId

Localization ID of this package

public FString LocalizationId;

UASSET_MAGIC

Magic number for the .uasset format

public static uint UASSET_MAGIC;

ACE7_MAGIC

Magic number for Ace Combat 7 encrypted .uasset format

public static uint ACE7_MAGIC;

Properties

PackageFlags

The flags for this package.

public EPackageFlags PackageFlags { get; set; }

Property Value

EPackageFlags

HasUnversionedProperties

Whether or not this asset uses unversioned properties.

public bool HasUnversionedProperties { get; }

Property Value

Boolean

IsFilterEditorOnly

Whether or not this asset has PKG_FilterEditorOnly flag.

public bool IsFilterEditorOnly { get; }

Property Value

Boolean

Constructors

UAsset(String, EngineVersion, Usmap, CustomSerializationFlags)

Reads an asset from disk and initializes a new instance of the UAsset class to store its data in memory.

public UAsset(string path, EngineVersion engineVersion, Usmap mappings, CustomSerializationFlags customSerializationFlags)

Parameters

path String
The path of the asset file on disk that this instance will read from.

engineVersion EngineVersion
The version of the Unreal Engine that will be used to parse this asset. If the asset is versioned, this can be left unspecified.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

UAsset(String, Boolean, EngineVersion, Usmap, CustomSerializationFlags)

Reads an asset from disk and initializes a new instance of the UAsset class to store its data in memory.

public UAsset(string path, bool loadUexp, EngineVersion engineVersion, Usmap mappings, CustomSerializationFlags customSerializationFlags)

Parameters

path String
The path of the asset file on disk that this instance will read from.

loadUexp Boolean
Whether to load the .uexp file. False only reads the .uasset file.

engineVersion EngineVersion
The version of the Unreal Engine that will be used to parse this asset. If the asset is versioned, this can be left unspecified.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

UAsset(AssetBinaryReader, EngineVersion, Usmap, Boolean, CustomSerializationFlags)

Reads an asset from a BinaryReader and initializes a new instance of the UAsset class to store its data in memory.

public UAsset(AssetBinaryReader reader, EngineVersion engineVersion, Usmap mappings, bool useSeparateBulkDataFiles, CustomSerializationFlags customSerializationFlags)

Parameters

reader AssetBinaryReader
The asset's BinaryReader that this instance will read from. If a .uexp file exists, the .uexp file's data should be appended to the end of the .uasset file's data.

engineVersion EngineVersion
The version of the Unreal Engine that will be used to parse this asset. If the asset is versioned, this can be left unspecified.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

useSeparateBulkDataFiles Boolean
Does this asset uses separate bulk data files (.uexp, .ubulk)?

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

UAsset(EngineVersion, Usmap, CustomSerializationFlags)

Initializes a new instance of the UAsset class. This instance will store no asset data and does not represent any asset in particular until the UAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.

public UAsset(EngineVersion engineVersion, Usmap mappings, CustomSerializationFlags customSerializationFlags)

Parameters

engineVersion EngineVersion
The version of the Unreal Engine that will be used to parse this asset. If the asset is versioned, this can be left unspecified.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

UAsset(String, ObjectVersion, ObjectVersionUE5, List<CustomVersion>, Usmap, CustomSerializationFlags)

Reads an asset from disk and initializes a new instance of the UAsset class to store its data in memory.

public UAsset(string path, ObjectVersion objectVersion, ObjectVersionUE5 objectVersionUE5, List<CustomVersion> customVersionContainer, Usmap mappings, CustomSerializationFlags customSerializationFlags)

Parameters

path String
The path of the asset file on disk that this instance will read from.

objectVersion ObjectVersion
The UE4 object version of the Unreal Engine that will be used to parse this asset.

objectVersionUE5 ObjectVersionUE5
The UE5 object version of the Unreal Engine that will be used to parse this asset.

customVersionContainer List<CustomVersion>
A list of custom versions to parse this asset with.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

UAsset(AssetBinaryReader, ObjectVersion, ObjectVersionUE5, List<CustomVersion>, Usmap, Boolean, CustomSerializationFlags)

Reads an asset from a BinaryReader and initializes a new instance of the UAsset class to store its data in memory.

public UAsset(AssetBinaryReader reader, ObjectVersion objectVersion, ObjectVersionUE5 objectVersionUE5, List<CustomVersion> customVersionContainer, Usmap mappings, bool useSeparateBulkDataFiles, CustomSerializationFlags customSerializationFlags)

Parameters

reader AssetBinaryReader
The asset's BinaryReader that this instance will read from.

objectVersion ObjectVersion
The UE4 object version of the Unreal Engine that will be used to parse this asset.

objectVersionUE5 ObjectVersionUE5
The UE5 object version of the Unreal Engine that will be used to parse this asset.

customVersionContainer List<CustomVersion>
A list of custom versions to parse this asset with.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

useSeparateBulkDataFiles Boolean
Does this asset uses separate bulk data files (.uexp, .ubulk)?

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

UAsset(ObjectVersion, ObjectVersionUE5, List<CustomVersion>, Usmap, CustomSerializationFlags)

Initializes a new instance of the UAsset class. This instance will store no asset data and does not represent any asset in particular until the UAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.

public UAsset(ObjectVersion objectVersion, ObjectVersionUE5 objectVersionUE5, List<CustomVersion> customVersionContainer, Usmap mappings, CustomSerializationFlags customSerializationFlags)

Parameters

objectVersion ObjectVersion
The UE4 object version of the Unreal Engine that will be used to parse this asset.

objectVersionUE5 ObjectVersionUE5
The UE5 object version of the Unreal Engine that will be used to parse this asset.

customVersionContainer List<CustomVersion>
A list of custom versions to parse this asset with.

mappings Usmap
A valid set of mappings for the game that this asset is from. Not required unless unversioned properties are used.

customSerializationFlags CustomSerializationFlags
A set of custom serialization flags, which can be used to override certain optional behavior in how UAssetAPI serializes assets.

UAsset()

Initializes a new instance of the UAsset class. This instance will store no asset data and does not represent any asset in particular until the UAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.

public UAsset()

Methods

FixNameMapLookupIfNeeded()

internal void FixNameMapLookupIfNeeded()

GetNameMapIndexList()

Returns the name map as a read-only list of FStrings.

public IReadOnlyList<FString> GetNameMapIndexList()

Returns

IReadOnlyList<FString>
The name map as a read-only list of FStrings.

ClearNameIndexList()

Clears the name map. This method should be used with extreme caution, as it may break unparsed references to the name map.

public void ClearNameIndexList()

SetNameReference(Int32, FString)

Replaces a value in the name map at a particular index.

public void SetNameReference(int index, FString value)

Parameters

index Int32
The index to overwrite in the name map.

value FString
The value that will be replaced in the name map.

GetNameReference(Int32)

Gets a value in the name map at a particular index.

public FString GetNameReference(int index)

Parameters

index Int32
The index to return the value at.

Returns

FString
The value at the index provided.

GetNameReferenceWithoutZero(Int32)

Gets a value in the name map at a particular index, but with the index zero being treated as if it is not valid.

public FString GetNameReferenceWithoutZero(int index)

Parameters

index Int32
The index to return the value at.

Returns

FString
The value at the index provided.

ContainsNameReference(FString)

Checks whether or not the value exists in the name map.

public bool ContainsNameReference(FString search)

Parameters

search FString
The value to search the name map for.

Returns

Boolean
true if the value appears in the name map, otherwise false.

SearchNameReference(FString)

Searches the name map for a particular value.

public int SearchNameReference(FString search)

Parameters

search FString
The value to search the name map for.

Returns

Int32
The index at which the value appears in the name map.

Exceptions

NameMapOutOfRangeException
Thrown when the value provided does not appear in the name map.

AddNameReference(FString, Boolean)

Adds a new value to the name map.

public int AddNameReference(FString name, bool forceAddDuplicates)

Parameters

name FString
The value to add to the name map.

forceAddDuplicates Boolean
Whether or not to add a new entry if the value provided already exists in the name map.

Returns

Int32
The index of the new value in the name map. If the value already existed in the name map beforehand, that index will be returned instead.

Exceptions

ArgumentException
Thrown when forceAddDuplicates is false and the value provided is null or empty.

CanCreateDummies()

Whether or not we can create dummies in this name map. If false, attempting to define a dummy will append to the name map instead.

public bool CanCreateDummies()

Returns

Boolean
A boolean.

PathToStream(String, Boolean)

Creates a MemoryStream from an asset path.

public MemoryStream PathToStream(string p, bool loadUEXP)

Parameters

p String
The path to the input file.

loadUEXP Boolean
Whether to load the UEXP file. False only reads the UASSET.

Returns

MemoryStream
A new MemoryStream that stores the binary data of the input file.

PathToReader(String, Boolean)

Creates a BinaryReader from an asset path.

public AssetBinaryReader PathToReader(string p, bool loadUEXP)

Parameters

p String
The path to the input file.

loadUEXP Boolean
Whether to load the .uexp file. False only reads the .uasset file.

Returns

AssetBinaryReader
A new BinaryReader that stores the binary data of the input file.

GetClassExport()

Searches for and returns this asset's ClassExport, if one exists.

public ClassExport GetClassExport()

Returns

ClassExport
The asset's ClassExport if one exists, otherwise null.

ResolveAncestries()

Resolves the ancestry of all properties present in this asset.

public void ResolveAncestries()

FindAssetOnDiskFromPath(String)

Attempt to find another asset on disk given an asset path (i.e. one starting with /Game/).

public string FindAssetOnDiskFromPath(string path)

Parameters

path String
The asset path.

Returns

String
The path to the file on disk, or null if none could be found.

SetEngineVersion(EngineVersion)

Sets the version of the Unreal Engine to use in serialization.

public void SetEngineVersion(EngineVersion newVersion)

Parameters

newVersion EngineVersion
The new version of the Unreal Engine to use in serialization.

Exceptions

InvalidOperationException
Thrown when an invalid EngineVersion is specified.

GetEngineVersion(ObjectVersion, ObjectVersionUE5, List<CustomVersion>)

public static EngineVersion GetEngineVersion(ObjectVersion objectVersion, ObjectVersionUE5 objectVersionUE5, List<CustomVersion> customVersionContainer)

Parameters

objectVersion ObjectVersion

objectVersionUE5 ObjectVersionUE5

customVersionContainer List<CustomVersion>

Returns

EngineVersion

GetEngineVersion()

Estimates the retail version of the Unreal Engine based on the object and custom versions.

public EngineVersion GetEngineVersion()

Returns

EngineVersion
The estimated retail version of the Unreal Engine.

GetCustomVersion(Guid)

Fetches the version of a custom version in this asset.

public int GetCustomVersion(Guid key)

Parameters

key Guid
The GUID of the custom version to retrieve.

Returns

Int32
The version of the retrieved custom version.

GetCustomVersion(String)

Fetches the version of a custom version in this asset.

public int GetCustomVersion(string friendlyName)

Parameters

friendlyName String
The friendly name of the custom version to retrieve.

Returns

Int32
The version of the retrieved custom version.

GetCustomVersion<T>()

Fetches a custom version's enum value based off of its type.

public T GetCustomVersion<T>()

Type Parameters

T
The enum type of the custom version to retrieve.

Returns

T
The enum value of the requested custom version.

Exceptions

ArgumentException
Thrown when T is not an enumerated type.

GuessCustomVersionFromTypeAndEngineVersion(EngineVersion, Type)

public static int GuessCustomVersionFromTypeAndEngineVersion(EngineVersion chosenVersion, Type typ)

Parameters

chosenVersion EngineVersion

typ Type

Returns

Int32

GetDefaultCustomVersionContainer(EngineVersion)

Fetches a list of all default custom versions for a specific Unreal version.

public static List<CustomVersion> GetDefaultCustomVersionContainer(EngineVersion chosenVersion)

Parameters

chosenVersion EngineVersion
The version of the engine to check against.

Returns

List<CustomVersion>
A list of all the default custom version values for the given engine version.

ParseExport(AssetBinaryReader, Int32, Boolean)

Read an export from disk.

public void ParseExport(AssetBinaryReader reader, int i, bool read)

Parameters

reader AssetBinaryReader
The binary reader.

i Int32
The index of the export in the export map to read.

read Boolean
Whether or not to serialize the body of the export. If false, simply converts to the respective sub-type.

ConvertExportToChildExportAndRead(AssetBinaryReader, Int32, Boolean)

public void ConvertExportToChildExportAndRead(AssetBinaryReader reader, int i, bool read)

Parameters

reader AssetBinaryReader

i Int32

read Boolean

VerifyBinaryEquality()

Checks whether or not this asset maintains binary equality when serialized.

public bool VerifyBinaryEquality()

Returns

Boolean
Whether or not the asset maintained binary equality.

GetParentClass(FName&, FName&)

Finds the class path and export name of the SuperStruct of this asset, if it exists.

public void GetParentClass(FName& parentClassPath, FName& parentClassExportName)

Parameters

parentClassPath FName&
The class path of the SuperStruct of this asset, if it exists.

parentClassExportName FName&
The export name of the SuperStruct of this asset, if it exists.

GetParentClassExportName(FName&)

internal FName GetParentClassExportName(FName& modulePath)

Parameters

modulePath FName&

Returns

FName

AddImport(Import)

Adds a new import to the import map. This is equivalent to adding directly to the UAsset.Imports list.

public FPackageIndex AddImport(Import li)

Parameters

li Import
The new import to add to the import map.

Returns

FPackageIndex
The FPackageIndex corresponding to the newly-added import.

SearchForImport(FName, FName, FPackageIndex, FName)

Searches for an import in the import map based off of certain parameters.

public int SearchForImport(FName classPackage, FName className, FPackageIndex outerIndex, FName objectName)

Parameters

classPackage FName
The ClassPackage that the requested import will have.

className FName
The ClassName that the requested import will have.

outerIndex FPackageIndex
The CuterIndex that the requested import will have.

objectName FName
The ObjectName that the requested import will have.

Returns

Int32
The index of the requested import in the name map, or zero if one could not be found.

SearchForImport(FName, FName, FName)

Searches for an import in the import map based off of certain parameters.

public int SearchForImport(FName classPackage, FName className, FName objectName)

Parameters

classPackage FName
The ClassPackage that the requested import will have.

className FName
The ClassName that the requested import will have.

objectName FName
The ObjectName that the requested import will have.

Returns

Int32
The index of the requested import in the name map, or zero if one could not be found.

SearchForImport(FName)

Searches for an import in the import map based off of certain parameters.

public int SearchForImport(FName objectName)

Parameters

objectName FName
The ObjectName that the requested import will have.

Returns

Int32
The index of the requested import in the name map, or zero if one could not be found.

PullSchemasFromAnotherAsset(FName, FName)

public bool PullSchemasFromAnotherAsset(FName path, FName desiredObject)

Parameters

path FName

desiredObject FName

Returns

Boolean

CopySplitUp(Stream, Stream, Int32, Int32)

Copies a portion of a stream to another stream.

internal static void CopySplitUp(Stream input, Stream output, int start, int leng)

Parameters

input Stream
The input stream.

output Stream
The output stream.

start Int32
The offset in the input stream to start copying from.

leng Int32
The length in bytes of the data to be copied.

Read(AssetBinaryReader, Int32[], Int32[])

Reads an asset into memory.

public void Read(AssetBinaryReader reader, Int32[] manualSkips, Int32[] forceReads)

Parameters

reader AssetBinaryReader
The input reader.

manualSkips Int32[]
An array of export indices to skip parsing. For most applications, this should be left blank.

forceReads Int32[]
An array of export indices that must be read, overriding entries in the manualSkips parameter. For most applications, this should be left blank.

Exceptions

UnknownEngineVersionException
Thrown when this is an unversioned asset and UAsset.ObjectVersion is unspecified.

FormatException
Throw when the asset cannot be parsed correctly.

WriteData()

Serializes an asset from memory.

public MemoryStream WriteData()

Returns

MemoryStream
A new MemoryStream containing the full binary data of the serialized asset.

Write(MemoryStream&, MemoryStream&)

Serializes and writes an asset to two split streams (.uasset and .uexp) from memory.

public void Write(MemoryStream& uassetStream, MemoryStream& uexpStream)

Parameters

uassetStream MemoryStream&
A stream containing the contents of the .uasset file.

uexpStream MemoryStream&
A stream containing the contents of the .uexp file, if needed, otherwise null.

Exceptions

UnknownEngineVersionException
Thrown when UAsset.ObjectVersion is unspecified.

Write(String)

Serializes and writes an asset to disk from memory.

public void Write(string outputPath)

Parameters

outputPath String
The path on disk to write the asset to.

Exceptions

UnknownEngineVersionException
Thrown when UAsset.ObjectVersion is unspecified.

SerializeJson(Boolean)

Serializes this asset as JSON.

public string SerializeJson(bool isFormatted)

Parameters

isFormatted Boolean
Whether or not the returned JSON string should be indented.

Returns

String
A serialized JSON string that represents the asset.

SerializeJson(Formatting)

Serializes this asset as JSON.

public string SerializeJson(Formatting jsonFormatting)

Parameters

jsonFormatting Formatting
The formatting to use for the returned JSON string.

Returns

String
A serialized JSON string that represents the asset.

SerializeJsonObject(Object, Boolean)

Serializes an object as JSON.

public string SerializeJsonObject(object value, bool isFormatted)

Parameters

value Object
The object to serialize as JSON.

isFormatted Boolean
Whether or not the returned JSON string should be indented.

Returns

String
A serialized JSON string that represents the object.

SerializeJsonObject(Object, Formatting)

Serializes an object as JSON.

public string SerializeJsonObject(object value, Formatting jsonFormatting)

Parameters

value Object
The object to serialize as JSON.

jsonFormatting Formatting
The formatting to use for the returned JSON string.

Returns

String
A serialized JSON string that represents the object.

DeserializeJsonObject<T>(String)

Deserializes an object from JSON.

public T DeserializeJsonObject<T>(string json)

Type Parameters

T

Parameters

json String
A serialized JSON string to parse.

Returns

T

DeserializeJson(String)

Reads an asset from serialized JSON and initializes a new instance of the UAsset class to store its data in memory.

public static UAsset DeserializeJson(string json)

Parameters

json String
A serialized JSON string to parse.

Returns

UAsset

DeserializeJson(Stream)

Reads an asset from serialized JSON and initializes a new instance of the UAsset class to store its data in memory.

public static UAsset DeserializeJson(Stream stream)

Parameters

stream Stream
A stream containing serialized JSON string to parse.

Returns

UAsset