IPackageResourceManager::OpenReadPackage

Open an [FArchive](API\Runtime\Core\Serialization\FArchive) to read the bytes of the package

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/PackageResourceManager.h

Include

#include "UObject/PackageResourceManager.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/PackageResourceManager.cpp

Syntax

FOpenPackageResult OpenReadPackage
(
    const FPackagePath & PackagePath,
    FPackagePath * OutUpdatedPath
)

Remarks

Open an FArchive to read the bytes of the package

Returns

An FOpenPackageResult, with Result.Archive == archive for the bytes of the package or nullptr if it isn't found, and with other data describing the returned archive (see FOpenPackageResult)

Parameters

Parameter

Description

PackagePath

The package to look for

OutUpdatedPath

If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), and if the package exists, the specific extension found is set