Files
UnrealEngineUWP/Engine/Source/Editor/EditorConfig/Private/EditorConfigBase.cpp
sebastian nordgren e53720fc25 UEditorConfigBase now won't load or save if GEditor is not initialized.
#rb lauren.barnes

[CL 16483466 by sebastian nordgren in ue5-main branch]
2021-05-27 09:29:38 -04:00

31 lines
670 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "EditorConfigBase.h"
#include "EditorConfigSubsystem.h"
#include "Editor.h"
bool UEditorConfigBase::LoadEditorConfig()
{
if (GEditor)
{
UEditorConfigSubsystem* Subsystem = GEditor->GetEditorSubsystem<UEditorConfigSubsystem>();
if (Subsystem)
{
return Subsystem->LoadConfigObject(this->GetClass(), this);
}
}
return false;
}
bool UEditorConfigBase::SaveEditorConfig() const
{
if (GEditor)
{
UEditorConfigSubsystem* Subsystem = GEditor->GetEditorSubsystem<UEditorConfigSubsystem>();
if (Subsystem)
{
return Subsystem->SaveConfigObject(this->GetClass(), this);
}
}
return false;
}