A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DlgCommandletHelper.h
Go to the documentation of this file.
1
// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved.
2
#pragma once
3
4
#include "CoreMinimal.h"
5
6
#include "FileHelpers.h"
7
#include "
DlgDialogue.h
"
8
#include "
DlgManager.h
"
9
10
11
class
FDlgCommandletHelper
12
{
13
public
:
14
static
bool
SaveAllDirtyDialogues
()
15
{
16
// Save all dirty packages
17
constexpr
bool
bPromptUserToSave =
false
;
18
constexpr
bool
bFastSave =
true
;
19
constexpr
bool
bNotifyNoPackagesSaved =
false
;
20
constexpr
bool
bCanBeDeclined =
false
;
21
static
TArray<UClass*> SaveContentClasses = { UDlgDialogue::StaticClass() };
22
return
FEditorFileUtils::SaveDirtyContentPackages(SaveContentClasses, bPromptUserToSave, bFastSave, bNotifyNoPackagesSaved, bCanBeDeclined);
23
}
24
25
static
bool
SaveAllDialogues
()
26
{
27
TArray<UDlgDialogue*> Dialogues =
UDlgManager::GetAllDialoguesFromMemory
();
28
TArray<UPackage*> PackagesToSave;
29
for
(
UDlgDialogue
*
Dialogue
: Dialogues)
30
{
31
Dialogue
->OnPreAssetSaved();
32
Dialogue
->MarkPackageDirty();
33
PackagesToSave.Add(
Dialogue
->GetOutermost());
34
}
35
36
static
constexpr
bool
bCheckDirty =
false
;
37
return
UEditorLoadingAndSavingUtils::SavePackages(PackagesToSave, bCheckDirty);
38
}
39
};
EDialogueTreeNodeCategoryType::Dialogue
@ Dialogue
DlgDialogue.h
DlgManager.h
FDlgCommandletHelper
Definition
DlgCommandletHelper.h:12
FDlgCommandletHelper::SaveAllDirtyDialogues
static bool SaveAllDirtyDialogues()
Definition
DlgCommandletHelper.h:14
FDlgCommandletHelper::SaveAllDialogues
static bool SaveAllDialogues()
Definition
DlgCommandletHelper.h:25
UDlgDialogue
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
Definition
DlgDialogue.h:85
UDlgManager::GetAllDialoguesFromMemory
static TArray< UDlgDialogue * > GetAllDialoguesFromMemory()
Definition
DlgManager.cpp:251
SDKDemo
Plugins
UnrealEngineSDK
VisualScripter
Source
DlgSystemEditor
Private
Commandlets
DlgCommandletHelper.h
Generated
Wed Oct 9 2024 19:52:54
by Doxygen version
1.10.0