UPackage::Save

Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/Package.h"

Source

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

Syntax

static FSavePackageResultStruct Save
(
    UPackage * InOuter,
    UObject * Base,
    EObjectFlags TopLevelFlags,
    const TCHAR * Filename,
    FOutputDevice * Error,
    FLinkerNull * Conform,
    bool bForceByteSwapping,
    bool bWarnOfLongFilename,
    uint32 SaveFlags,
    const class ITargetPlatform * TargetPlatform,
    const FDateTime & FinalTimeStamp,
    bool bSlowTask,
    class FArchiveDiffMap * InOutDiffMap,
    FSavePackageContext * SavePackageContext
)

Remarks

Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package.

Returns

FSavePackageResultStruct enum value with the result of saving a package as well as extra data

Parameters

Parameter

Description

InOuter

the outer to use for the new package

Base

the object that should be saved into the package

TopLevelFlags

For all objects which are not referenced [either directly, or indirectly] through Base, only objects that contain any of these flags will be saved. If 0 is specified, only objects which are referenced by Base will be saved into the package.

Filename

the name to use for the new package file

Error

error output

Conform

if non-NULL, all index tables for this will be sorted to match the order of the corresponding index table in the conform package

bForceByteSwapping

whether we should forcefully byte swap before writing to disk

bWarnOfLongFilename

[opt] If true (the default), warn when saving to a long filename.

SaveFlags

Flags to control saving

TargetPlatform

The platform being saved for

FinalTimeStamp

If not FDateTime::MinValue(), the timestamp the saved file should be set to. (Intended for cooking only...)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss