UEditorAssetLibrary::SaveAsset

Save the packages the assets live in.

Windows
MacOS
Linux

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorAssetLibrary.h

Include

#include "EditorAssetLibrary.h"

Source

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Private/EditorAssetLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Asset")
static bool SaveAsset
(
    const FString & AssetToSave,
    bool bOnlyIfIsDirty
)

Remarks

Save the packages the assets live in. All objects that live in the package will be saved. Will try to checkout the file first. The Asset will be loaded before being saved.

Returns

True if the operation succeeds.

Parameters

Parameter

Description

AssetsToSave

Asset Path of the asset that we want to save.

bOnlyIfIsDirty

Only checkout/save the asset if it's dirty.

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