You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb PJ.Kack #rnx #jira UE-139708 #preflight 61eaaedfc92021e535b6d1e0 - The goal is to show a clear separation between the bulkdata object and the virtualization system. - NOTE that all of these classes were added during 5.0 development so we are just renaming and moving them, no deprecation paths. - Renamed FVirtualizedUntypedBulkData to FEditorBulkData -- Also removed the derived templated types, they were never actually used - Renamed FVirtualizedBulkDataReader to FEditorBulkDataReader - Renamed FVirtualizedBulkDataWriter to FEditorBulkDataWriter - Moved the renamed classes to the UE::Serialization namespace from UE::Virtualization - Renamed the files of the renamed classes where required. - Replaced use of LogVirtualization with LogSerialization. - Renamed defines prefixed with VBD_* to UE_ and make sure they are undefed by the end of the cpp - Edited unit tests to show up under "System.CoreUObject.Serialization.EditorBulkData.*" #ROBOMERGE-AUTHOR: paul.chipchase #ROBOMERGE-SOURCE: CL 18688778 in //UE5/Release-5.0/... via CL 18688787 via CL 18688810 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18688823 by paul chipchase in ue5-main branch]
67 lines
2.3 KiB
C++
67 lines
2.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
#include "Features/IModularFeatures.h"
|
|
#include "ISourceControlModule.h"
|
|
#include "MessageLogModule.h"
|
|
#include "Misc/DelayedAutoRegister.h"
|
|
#include "PackageSubmissionChecks.h"
|
|
#include "Serialization/EditorBulkData.h"
|
|
#include "VirtualizationSourceControlUtilities.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "Virtualization"
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
|
|
class FVirtualizationModule : public IModuleInterface
|
|
{
|
|
public:
|
|
virtual void StartupModule() override
|
|
{
|
|
IModularFeatures::Get().RegisterModularFeature(FName("VirtualizationSourceControlUtilities"), &SourceControlutility);
|
|
|
|
// Delay this until after the source control module has loaded
|
|
FDelayedAutoRegisterHelper(EDelayedRegisterRunPhase::EarliestPossiblePluginsLoaded, [this]()
|
|
{
|
|
PackageSubmissionHandle = ISourceControlModule::Get().RegisterPreSubmitFinalize(
|
|
FSourceControlPreSubmitFinalizeDelegate::FDelegate::CreateStatic(&OnPrePackageSubmission));
|
|
});
|
|
|
|
FMessageLogModule& MessageLogModule = FModuleManager::LoadModuleChecked<FMessageLogModule>("MessageLog");
|
|
MessageLogModule.RegisterLogListing("LogVirtualization", LOCTEXT("AssetVirtualizationLogLabel", "Asset Virtualization"));
|
|
}
|
|
|
|
virtual void ShutdownModule() override
|
|
{
|
|
if (FModuleManager::Get().IsModuleLoaded("MessageLog"))
|
|
{
|
|
FMessageLogModule& MessageLogModule = FModuleManager::GetModuleChecked<FMessageLogModule>("MessageLog");
|
|
MessageLogModule.UnregisterLogListing("LogVirtualization&");
|
|
}
|
|
|
|
// The SourceControl module might be destroyed before this one, depending on shutdown order so we need to check if
|
|
// it is loaded before unregistering.
|
|
if (ISourceControlModule* SourceControlModule = FModuleManager::GetModulePtr<ISourceControlModule>(FName("SourceControl")))
|
|
{
|
|
SourceControlModule->UnregisterPreSubmitFinalize(PackageSubmissionHandle);
|
|
}
|
|
|
|
PackageSubmissionHandle.Reset();
|
|
|
|
IModularFeatures::Get().UnregisterModularFeature(FName("VirtualizationSourceControlUtilities"), &SourceControlutility);
|
|
}
|
|
|
|
private:
|
|
Experimental::FVirtualizationSourceControlUtilities SourceControlutility;
|
|
|
|
FDelegateHandle PackageSubmissionHandle;
|
|
};
|
|
|
|
} // namespace UE::Virtualization
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
IMPLEMENT_MODULE(UE::Virtualization::FVirtualizationModule, Virtualization);
|