虚幻4 加载蓝图的的过程(1)——读取文件头

本文详细介绍了虚幻4引擎在加载蓝图时如何读取文件头的过程,涉及Engine_Updating模块的相关源码,包括CoreUObject的Linker.h和PackageFileSummary.cpp中的实现细节。
摘要由CSDN通过智能技术生成

首先是读取文件头:

文件头结构体:

Engine_Updating\Engine\Source\Runtime\CoreUObject\Public\UObject\Linker.h

/**
 * A "table of contents" for an Unreal package file.  Stored at the top of the file.
 */
struct FPackageFileSummary
{
	/**
	 * Magic tag compared against PACKAGE_FILE_TAG to ensure that package is an Unreal package.
	 */
	int32		Tag;

private:
	/* UE4 file version */
	int32		FileVersionUE4;
	/* Licensee file version */
	int32		FileVersionLicenseeUE4;
	/* Custom version numbers. Keyed off a unique tag for each custom component. */
	FCustomVersionContainer CustomVersionContainer;

public:
	/**
	 * Total size of all information that needs to be read in to create a FLinkerLoad. This includes
	 * the package file summary, name table and import & export maps.
	 */
	int32		TotalHeaderSize;

	/**
	 * The flags for the package
	 */
	uint32	PackageFlags;

	/**
	 * The Generic Browser folder name that this package lives in
	 */
	FString	FolderName;

	/**
	 * Number of names used in this package
	 */
	int32		NameCount;

	/**
	 * Location into the file on disk for the name data
	 */
	int32 	NameOffset;

	/**
	 * Number of gatherable text data items in this package
	 */
	int32	GatherableTextDataCount;

	/**
	 * Location into the file on disk for the gatherable text data items
	 */
	int32 	GatherableTextDataOffset;
	
	/**
	 * Number of exports contained in this package
	 */
	int32		ExportCount;

	/**
	 * Location into the file on disk for the ExportMap data
	 */
	int32		ExportOffset;

	/**
	 * Number of imports contained in this package
	 */
	int32		ImportCount;

	/**
	 * Location into the file on disk for the ImportMap data
	 */
	int32		ImportOffset;

	/**
	* Location into the file on disk for the DependsMap data
	*/
	int32		DependsOffset;

	/**
	 * Number of references contained in this package
	 */
	int32		StringAssetReferencesCount;

	/**
	 * Location into the file on disk for the string asset references map data
	 */
	int32		StringAssetReferencesOffset;

	/**
	 * Thumbnail table offset
	 */
	int32		ThumbnailTableOffset;

	/**
	 * Current id for this package
	 */
	FGuid	Guid;

	/**
	 * Data about previous versions of this package
	 */
	TArray<FGenerationInfo> Generations;

	/**
	 * Engine version this package was saved with. For hotfix releases and engine versions which maintain strict binary compatibility with another version, this may differ from CompatibleWithEngineVersion.
	 */
	FEngineVersion SavedByEngineVersion;

	/**
	 * Engine version this package is compatible with. See S
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值