FabianFG/CUE4Parse
关于
CUE4Parse is a parsing library designed specifically for extracting data from archives and packages generated by Unreal Engine 4 and 5. It provides extensive support for parsing and processing native data classes such as UObject, UTexture2D, UAnimSequence, UStaticMesh, and many more. It also offers abstraction layers that enable developers to customize and type their own package formats, to allow them to work with packages that may have unique requirements or structures.
其他项目实测星标增长
- 24小时
- +2
- 7天
- +8
- 15天
- +14
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文CUE4Parse - An Unreal Engine Archives & Packages Parsing Library in C#
Description:
CUE4Parse is a parsing library designed specifically for extracting data from archives and packages generated by Unreal Engine 4 and 5. It provides extensive support for parsing and processing native data classes such as UObject, UTexture2D, UAnimSequence, UStaticMesh, and many more. It also offers abstraction layers that enable developers to customize and type their own package formats, to allow them to work with packages that may have unique requirements or structures.
While primarily used and maintained by the FModel team for their various projects, contributions to the library are always welcome, particularly in the areas of memory efficiency, and execution time.
Quickstart:
Installation
Add the NuGet package to your project:
dotnet add package CUE4Parse
Alternatively, you can clone the repository and include it in your project as a reference:
git clone https://github.com/FabianFG/CUE4Parse.git --recursive
Example
var provider = new DefaultFileProvider(ARCHIVE_DIRECTORY_HERE, SearchOption.TopDirectoryOnly, true, new VersionContainer(EGame.GAME_UE4_27));
provider.Initialize(); // will scan the archive directory for supported file extensions
var allObjects = provider.LoadAllObjects(PACKAGE_PATH_HERE); // {GAME}/Content/Folder1/Folder2/PackageName.uasset
var fullJson = JsonConvert.SerializeObject(allExports, Formatting.Indented);
var obj = provider.LoadObject(OBJECT_PATH_HERE); // {GAME}/Content/Folder1/Folder2/PackageName.ObjectName
var objJson = JsonConvert.SerializeObject(objectExport, Formatting.Indented);
switch (obj)
{
case UTexture2D texture:
{
var bitmap = texture.Decode(ETexturePlatform.DesktopMobile);
...
}
case USoundWave:
{
objectExport.Decode(true, out var audioFormat, out var data);
...
}
case UStaticMesh:
case USkeletalMesh:
case UAnimSequence:
{
var toSave = new Exporter(objectExport, EXPORT_OPTIONS_HERE);
var success = toSave.TryWriteToDir(SAVE_DIRECTORY_INFO_HERE, out var label, out var savedFilePath);
...
}
default:
{
...
}
}
Further detailed documentation is available in the wiki
License:
CUE4Parse is licensed under Apache License 2.0, and licenses of third-party libraries used are listed here.
探索相关项目
加载中…