Files
UnrealEngineUWP/Engine/Source/Editor/DataLayerEditor/Public/DataLayerEditorModule.h
richard malo 14620f45a3 External Data Layer V1
- Allows for plugins to inject/remove content (actors) in a partitioned world
- Serves as a replacement for the experimental 'Content Bundle' feature
- Added new External Data Layer (EDL) Asset
- Added new Game Feature Action 'AddWorldPartitionContent' to control activation of an EDL asset
- Supports Data Layers inside a plugin (child of an EDL)
- Added builder to convert content bundles to EDL (UGameFeatureActionConvertContentBundleWorldPartitionBuilder)
- Feature is temporarily disabled by default and can be turned on using Editor Experimental Settings 'Enable World Partition External Data Layers' flag
#jira UE-204248
#rb JeanFrancois.Dube, Patrick.Enfedaque, Sebastien.Lussier
#tests QAGame PIE/-game/cooked, Regression test PIE/cook of latest game map, Tested PIE/cook of latest game map converted to EDL

[CL 31015614 by richard malo in ue5-main branch]
2024-01-30 14:18:27 -05:00

64 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
#include "CoreMinimal.h"
#include "Delegates/Delegate.h"
#include "Framework/Commands/UICommandList.h"
#include "Framework/MultiBox/MultiBoxExtender.h"
#include "Templates/SharedPointer.h"
#include "WorldPartition/DataLayer/IDataLayerEditorModule.h"
class AActor;
class FExtender;
class FUICommandList;
class SWidget;
class UDataLayerInstance;
class UExternalDataLayerAsset;
/**
* The module holding all of the UI related pieces for DataLayers
*/
class FDataLayerEditorModule : public IDataLayerEditorModule
{
public:
/**
* Called right after the module DLL has been loaded and the module object has been created
*/
virtual void StartupModule();
/**
* Called before the module is unloaded, right before the module object is destroyed.
*/
virtual void ShutdownModule();
/**
* Creates a DataLayer Browser widget
*/
virtual TSharedRef<class SWidget> CreateDataLayerBrowser();
/*
* Selected DataLayer in DataLayer Browser widget
*/
virtual void SyncDataLayerBrowserToDataLayer(const UDataLayerInstance* DataLayer);
/** Delegates to be called to extend the DataLayers menus */
typedef TPair<TWeakObjectPtr<const UDataLayerInstance>, TWeakObjectPtr<const AActor>> FDataLayerActor;
DECLARE_DELEGATE_RetVal_ThreeParams(TSharedRef<FExtender>, FDataLayersMenuExtender, const TSharedRef<FUICommandList>, const TSet<TWeakObjectPtr<const UDataLayerInstance>>& /*SelectedDataLayers*/, const TSet<FDataLayerActor>& /*SelectedDataLayerActors*/);
virtual TArray<FDataLayersMenuExtender>& GetAllDataLayersMenuExtenders() { return DataLayersMenuExtenders; }
/* Implement IDataLayerEditorModule */
virtual bool AddActorToDataLayers(AActor* Actor, const TArray<UDataLayerInstance*>& DataLayers) override;
virtual void SetActorEditorContextCurrentExternalDataLayer(const UExternalDataLayerAsset* InExternalDataLayerAsset) override;
private:
TWeakPtr<SWidget> DataLayerBrowser;
/** All extender delegates for the DataLayers menus */
TArray<FDataLayersMenuExtender> DataLayersMenuExtenders;
};