ZenAsset
Namespace: UAssetAPI.IO
public class ZenAsset : UAssetAPI.UnrealPackage, INameMap
Inheritance Object → UnrealPackage → ZenAsset
Implements INameMap
Fields
GlobalData
The global data of the game that this asset is from.
public IOGlobalData GlobalData;
ZenVersion
public EZenPackageVersion ZenVersion;
Name
public FName Name;
SourceName
public FName SourceName;
VerifyHashes
Should serialized hashes be verified on read?
public bool VerifyHashes;
HashVersion
public ulong HashVersion;
BulkDataMap
public Byte[] BulkDataMap;
ImportedPublicExportHashes
public UInt64[] ImportedPublicExportHashes;
Imports
Map of object imports. UAssetAPI used to call these "links."
public List<FPackageObjectIndex> Imports;
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;
Properties
PackageFlags
The flags for this package.
public EPackageFlags PackageFlags { get; set; }
Property Value
HasUnversionedProperties
Whether or not this asset uses unversioned properties.
public bool HasUnversionedProperties { get; }
Property Value
IsFilterEditorOnly
Whether or not this asset has PKG_FilterEditorOnly flag.
public bool IsFilterEditorOnly { get; }
Property Value
Constructors
ZenAsset(String, EngineVersion, Usmap)
Reads an asset from disk and initializes a new instance of the UAsset class to store its data in memory.
public ZenAsset(string path, EngineVersion engineVersion, Usmap mappings)
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.
Exceptions
UnknownEngineVersionException
Thrown when this is an unversioned asset and ObjectVersion is unspecified.
FormatException
Throw when the asset cannot be parsed correctly.
ZenAsset(AssetBinaryReader, EngineVersion, Usmap, Boolean)
Reads an asset from a BinaryReader and initializes a new instance of the ZenAsset class to store its data in memory.
public ZenAsset(AssetBinaryReader reader, EngineVersion engineVersion, Usmap mappings, bool useSeparateBulkDataFiles)
Parameters
reader
AssetBinaryReader
The asset's BinaryReader 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.
useSeparateBulkDataFiles
Boolean
Does this asset uses separate bulk data files (.uexp, .ubulk)?
Exceptions
UnknownEngineVersionException
Thrown when this is an unversioned asset and ObjectVersion is unspecified.
FormatException
Throw when the asset cannot be parsed correctly.
ZenAsset(EngineVersion, Usmap)
Initializes a new instance of the ZenAsset class. This instance will store no asset data and does not represent any asset in particular until the ZenAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.
public ZenAsset(EngineVersion engineVersion, Usmap mappings)
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.
ZenAsset(String, ObjectVersion, List<CustomVersion>, Usmap)
Reads an asset from disk and initializes a new instance of the ZenAsset class to store its data in memory.
public ZenAsset(string path, ObjectVersion objectVersion, List<CustomVersion> customVersionContainer, Usmap mappings)
Parameters
path
String
The path of the asset file on disk that this instance will read from.
objectVersion
ObjectVersion
The 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.
Exceptions
UnknownEngineVersionException
Thrown when this is an unversioned asset and ObjectVersion is unspecified.
FormatException
Throw when the asset cannot be parsed correctly.
ZenAsset(AssetBinaryReader, ObjectVersion, List<CustomVersion>, Usmap, Boolean)
Reads an asset from a BinaryReader and initializes a new instance of the ZenAsset class to store its data in memory.
public ZenAsset(AssetBinaryReader reader, ObjectVersion objectVersion, List<CustomVersion> customVersionContainer, Usmap mappings, bool useSeparateBulkDataFiles)
Parameters
reader
AssetBinaryReader
The asset's BinaryReader that this instance will read from.
objectVersion
ObjectVersion
The 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)?
Exceptions
UnknownEngineVersionException
Thrown when this is an unversioned asset and ObjectVersion is unspecified.
FormatException
Throw when the asset cannot be parsed correctly.
ZenAsset(ObjectVersion, List<CustomVersion>, Usmap)
Initializes a new instance of the ZenAsset class. This instance will store no asset data and does not represent any asset in particular until the ZenAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.
public ZenAsset(ObjectVersion objectVersion, List<CustomVersion> customVersionContainer, Usmap mappings)
Parameters
objectVersion
ObjectVersion
The 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.
ZenAsset()
Initializes a new instance of the ZenAsset class. This instance will store no asset data and does not represent any asset in particular until the ZenAsset.Read(AssetBinaryReader, Int32[], Int32[]) method is manually called.
public ZenAsset()
Methods
GetStringFromCityHash64(UInt64)
public string GetStringFromCityHash64(ulong val)
Parameters
val
UInt64
Returns
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
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 indexes to skip parsing. For most applications, this should be left blank.
forceReads
Int32[]
An array of export indexes that must be read, overriding entries in the manualSkips parameter. For most applications, this should be left blank.
Exceptions
UnknownEngineVersionException
Thrown when ObjectVersion is unspecified.
FormatException
Throw when the asset cannot be parsed correctly.
WriteData()
Serializes an asset from memory.
public MemoryStream WriteData()
Returns
MemoryStream
A stream that the asset has been serialized to.
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 ObjectVersion is unspecified.