Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstanceEditorSettings.cpp
Patrick Enfedaque 4aff876dff LevelInstance: Can now drag worlds from content browser to create a level instance
#jira FORT-488513
#rb jeanfrancois.dube
#preflight 62acb174c0449d3dccbb671a
#robomerge EngineMerge

[CL 20705831 by Patrick Enfedaque in ue5-main branch]
2022-06-17 13:22:13 -04:00

27 lines
934 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LevelInstanceEditorSettings.h"
#include "LevelInstance/LevelInstanceActor.h"
ULevelInstanceEditorSettings::ULevelInstanceEditorSettings()
{
LevelInstanceClassName = ALevelInstance::StaticClass()->GetPathName();
}
ULevelInstanceEditorPerProjectUserSettings::ULevelInstanceEditorPerProjectUserSettings()
{
bAlwaysShowDialog = true;
PivotType = ELevelInstancePivotType::CenterMinZ;
}
void ULevelInstanceEditorPerProjectUserSettings::UpdateFrom(const FNewLevelInstanceParams& Params)
{
ULevelInstanceEditorPerProjectUserSettings* UserSettings = GetMutableDefault<ULevelInstanceEditorPerProjectUserSettings>();
if (Params.PivotType != UserSettings->PivotType || Params.bAlwaysShowDialog != UserSettings->bAlwaysShowDialog)
{
UserSettings->bAlwaysShowDialog = Params.bAlwaysShowDialog;
UserSettings->PivotType = Params.PivotType;
UserSettings->SaveConfig();
}
}