You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Added NetObjectFactory API * Users can now create their own net object factories to handle discovery and instantiation of any replicated object types. * An exemple of using this factory is to create your own replicated root objects that are not derived from the Actor class. Iris ActorBridge: * Created new Actor and SubObject net object factories. * Deleted existing code handling discovery and instantiation of actors from the Bridge ReplicationSystemTest: * Converted Test bridge to use the new net object factory API #jira UE-223565 #rb Mattias.Hornlund [CL 36240214 by louisphilippe seguin in 5.5 branch]
31 lines
1.1 KiB
C++
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());
|
|
}
|
|
|