Files
UnrealEngineUWP/Engine/Source/Editor/StringTableEditor/Public/StringTableEditorModule.h
julien stjean 3991bcb36d Reworked the migration tool so that it support moving assets inside of a plugin.
Added a global event for when some package are migrated. This can be used for hotfixes and as extension point for systems to react or add stuff to the migration.

Other changes that were required for the new migration:
Level streaming is now aware that the world might be part of a instanced package. When it validate that file for the streamed world exist it will use the path from the package linker of the world package.
The level postload function now prefer to use the Instancing Context package remapping from its linker to determine where it should load some of its external UActorFolder.
The StringTableEditorModule was modified to be able to properly react to the migration.

This change will still require some change in a future release to reduce its memory usage.

#rb Francis.Hurteau
#jira UE-162943, UE-161367, UE-161364, UE-161359, UE-161357, UE-161355, UE-161354, UE-145342
#preflight 6358419f2e6690262abbce83
#lockdown jeanmichel.dignard

[CL 22798574 by julien stjean in ue5-main branch]
2022-10-26 19:11:52 -04:00

52 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Toolkits/IToolkitHost.h"
#include "Modules/ModuleInterface.h"
#include "Toolkits/AssetEditorToolkit.h"
class IStringTableEditor;
class UStringTable;
namespace UE::AssetTools
{
struct FPackageMigrationContext;
}
/** String Table Editor module */
class STRINGTABLEEDITOR_API FStringTableEditorModule : public IModuleInterface,
public IHasMenuExtensibility, public IHasToolBarExtensibility
{
public:
// IModuleInterface
virtual void StartupModule() override;
virtual void ShutdownModule() override;
/**
* Creates an instance of string table editor object.
*
* @param Mode Mode that this editor should operate in
* @param InitToolkitHost When Mode is WorldCentric, this is the level editor instance to spawn this editor within
* @param StringTable The string table to start editing
*
* @return Interface to the new string table editor
*/
TSharedRef<IStringTableEditor> CreateStringTableEditor(const EToolkitMode::Type Mode, const TSharedPtr<class IToolkitHost>& InitToolkitHost, UStringTable* StringTable);
/** Gets the extensibility managers for outside entities to extend static mesh editor's menus and toolbars */
virtual TSharedPtr<FExtensibilityManager> GetMenuExtensibilityManager() override { return MenuExtensibilityManager; }
virtual TSharedPtr<FExtensibilityManager> GetToolBarExtensibilityManager() override { return ToolBarExtensibilityManager; }
/** StringTable Editor app identifier string */
static const FName StringTableEditorAppIdentifier;
private:
void OnPackageMigration(UE::AssetTools::FPackageMigrationContext& MigrationContext);
TSharedPtr<FExtensibilityManager> MenuExtensibilityManager;
TSharedPtr<FExtensibilityManager> ToolBarExtensibilityManager;
};