# CUE4Parse **Repository Path**: baohongyu/CUE4Parse ## Basic Information - **Project Name**: CUE4Parse - **Description**: No description available - **Primary Language**: C# - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-27 - **Last Updated**: 2025-02-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README CUE4Parse - An Unreal Engine Archives & Packages Parsing Library in C# ------------------------------------------ [![NuGet](https://img.shields.io/nuget/v/CUE4Parse)](https://www.nuget.org/packages/CUE4Parse) [![Activity](https://img.shields.io/github/commit-activity/y/FabianFG/CUE4Parse?color=yellow)]() *** ### Description: CUE4Parse is a parsing library designed specifically for extracting data from archives and packages generated by [Unreal Engine](https://www.unrealengine.com/en-US/) 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](https://github.com/4sval/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: ```shell dotnet add package CUE4Parse ``` Alternatively, you can clone the repository and include it in your project as a [reference](https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2022#projectreference): ```shell git clone https://github.com/FabianFG/CUE4Parse.git --recursive ``` #### Example ```csharp 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](https://github.com/FabianFG/CUE4Parse/wiki) ### License: CUE4Parse is licensed under [Apache License 2.0](https://github.com/FabianFG/CUE4Parse/blob/master/LICENSE), and licenses of third-party libraries used are listed [here](https://github.com/FabianFG/CUE4Parse/blob/master/NOTICE).