// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. #include "LandscapeUIDetails.h" //#include "Misc/Attribute.h" //#include "Misc/Guid.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "PropertyHandle.h" #include "DetailLayoutBuilder.h" #include "Runtime/Landscape/Classes/Landscape.h" //#include "Editor.h" FLandscapeUIDetails::FLandscapeUIDetails() { } FLandscapeUIDetails::~FLandscapeUIDetails() { } TSharedRef FLandscapeUIDetails::MakeInstance() { return MakeShareable( new FLandscapeUIDetails); } void FLandscapeUIDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder ) { TArray> EditingObjects; DetailBuilder.GetObjectsBeingCustomized(EditingObjects); if (EditingObjects.Num() == 1) { ALandscape* Landscape = Cast(EditingObjects[0].Get()); if (Landscape != nullptr && Landscape->NumSubsections == 1) { TSharedRef ComponentScreenSizeToUseSubSectionsProp = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ALandscapeProxy, ComponentScreenSizeToUseSubSections)); DetailBuilder.HideProperty(ComponentScreenSizeToUseSubSectionsProp); } } }