Files
UnrealEngineUWP/Engine/Source/Editor/LandscapeEditor/Private/LandscapeLayerInfoObjectFactory.cpp
luc eygasier a4580ce238 Adds default layer info object setting. Allowing to automatically create Layer Info by cloning the default object when creating a new landscape:
* Unifies the different places creating a Layer Info Object or accessing "sharedassets".
* Fixes UEFN not able to access created LayerInfo objects in the ContentBrowser
* Adds the ability to create Landscape Layer Info Object as a regular asset (ie: without the landscape editor). Needed for example to create a Default LandscapeLayerInfoObject

#preflight 628ff637911f194ea743c6f3
#rb Jonathan.Bard

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 20395352 via CL 20395370 via CL 20395392 via CL 20395403
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20398733 by luc eygasier in ue5-main branch]
2022-05-27 16:50:43 -04:00

21 lines
782 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LandscapeLayerInfoObjectFactory.h"
#include "AssetTypeCategories.h"
#include "LandscapeLayerInfoObject.h"
ULandscapeLayerInfoObjectFactory::ULandscapeLayerInfoObjectFactory(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
bCreateNew = true;
bEditAfterNew = true;
SupportedClass = ULandscapeLayerInfoObject::StaticClass();
}
UObject* ULandscapeLayerInfoObjectFactory::FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn)
{
ULandscapeLayerInfoObject* NewLayerInfoObject = NewObject<ULandscapeLayerInfoObject>(InParent, Class, Name, Flags | RF_Public | RF_Standalone | RF_Transactional);
return NewLayerInfoObject;
}