You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-157674 #rb jonathan.bard #preflight 6303dd75fa1ac183e5f64663 [CL 21492408 by Nickolas Drake in ue5-main branch]
19 lines
672 B
C++
19 lines
672 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "LandscapeEditorServices.h"
|
|
#include "SLandscapeLayerListDialog.h"
|
|
|
|
#if WITH_EDITOR
|
|
int32 FLandscapeEditorServices::GetOrCreateEditLayer(FName InEditLayerName, ALandscape* InTargetLandscape)
|
|
{
|
|
int32 ExistingLayerIndex = InTargetLandscape->GetLayerIndex(InEditLayerName);
|
|
if (ExistingLayerIndex == INDEX_NONE)
|
|
{
|
|
InTargetLandscape->CreateLayer(InEditLayerName);
|
|
TSharedPtr<SLandscapeLayerListDialog> Dialog = SNew(SLandscapeLayerListDialog, InTargetLandscape->LandscapeLayers);
|
|
Dialog->ShowModal();
|
|
ExistingLayerIndex = Dialog->InsertedLayerIndex;
|
|
}
|
|
return ExistingLayerIndex;
|
|
}
|
|
#endif // WITH_EDITOR
|