Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstanceEditorSettings.cpp
patrick enfedaque 36a35ce76a LevelInstance: Deprecate CanBeUsedByLevelInstance.
- Runtime: Level Instances that are WP will still get embedded in their parent world grid (independent of the value of bEnableStreaming)
- Editor: Level Instances with bEnableStreaming=true will now act as regular World Partitions when loaded on their own. Allowing for big Level Instances to be partially loaded outside of their owning world.
- Add Project Setting for default value to assign to new Level Instances

#rb jeanfrancois.dube, richard.malo

[CL 25926203 by patrick enfedaque in ue5-main branch]
2023-06-12 07:30:42 -04:00

28 lines
961 B
C++

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