GithubHelp home page GithubHelp logo

dldrago / cue4parse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabianfg/cue4parse

0.0 0.0 0.0 2.9 MB

License: Apache License 2.0

C++ 0.05% C 0.14% Smalltalk 0.57% C# 99.20% CMake 0.04%

cue4parse's Introduction

CUE4Parse - An Unreal Engine Archives & Packages Parsing Library in C#

NuGet Activity


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.

cue4parse's People

Contributors

4sval avatar gmatrixgames avatar amrsatrio avatar minshug avatar fabianfg avatar halfuwu avatar longerwarrior avatar floxay avatar adainrivers avatar notofficer avatar entraptaa avatar yretenai avatar xtigerhyperx avatar ezfndev avatar eof-1141 avatar thoo0224 avatar nitrog0d avatar ka1serm avatar will747 avatar tectors avatar narknon avatar klukule avatar kein avatar tamely avatar jacocococo avatar goomiiv2 avatar nottodisturb avatar cmbasnett avatar buckminsterfullerene02 avatar zed-0xff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.