Files
UnrealEngine/Engine/Plugins/Runtime/ReplicationSystemTestPlugin/Source/Private/ReplicationSystemTestPlugin.cpp
2025-05-18 13:04:45 +08:00

31 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ReplicationSystemTestPlugin/ReplicationSystemTestPlugin.h"
#include "Iris/ReplicationState/PropertyNetSerializerInfoRegistry.h"
#include "Iris/ReplicationSystem/NetObjectFactoryRegistry.h"
#include "Tests/ReplicationSystem/ReplicatedTestObjectFactory.h"
class FReplicationSystemTestPlugin: public IReplicationSystemTestPlugin
{
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
IMPLEMENT_MODULE( FReplicationSystemTestPlugin, ReplicationSystemTestPlugin )
void FReplicationSystemTestPlugin::StartupModule()
{
UE::Net::FNetObjectFactoryRegistry::RegisterFactory(UReplicatedTestObjectFactory::StaticClass(), UReplicatedTestObjectFactory::GetFactoryName());
}
void FReplicationSystemTestPlugin::ShutdownModule()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
// we call this function before unloading the module.
UE::Net::FNetObjectFactoryRegistry::UnregisterFactory(UReplicatedTestObjectFactory::GetFactoryName());
}