Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstanceEditorSettings.cpp
jeanfrancois dube 9880e2bf15 Level Instance:
- Exposed the runtime behavior so we can now place level instances referencing partitioned worlds that will be streamed at runtime instead of embedded in the container world.
  - Don't allow edit in place for partitioned level instance worlds that have streaming disabled, as we load the entire level when doing so and could result in out of memory situations.
  - Added a message box when trying to edit a level instance that can't be edited in place with the reason.
  - Can be reenabled by setting LevelInstanceEditorSettings.bEnableEditInPlaceStreamingEnabled to true.

#rb Patrick.Enfedaque, Richard.Malo

[CL 29784110 by jeanfrancois dube in ue5-main branch]
2023-11-16 13:35:30 -05:00

29 lines
1002 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LevelInstanceEditorSettings.h"
#include "LevelInstance/LevelInstanceActor.h"
ULevelInstanceEditorSettings::ULevelInstanceEditorSettings()
{
LevelInstanceClassName = ALevelInstance::StaticClass()->GetPathName();
bEnableStreaming = false;
bIsEditInPlaceStreamingEnabled = false;
}
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();
}
}