lucoiso/UEElementusInventory

UE5.1+: Implement the base support for IRIS replication for upcoming updates in the engine

Closed this issue · 1 comments

Include headers if IRIS is enabled && if necessary:

#if UE_WITH_IRIS
#include "Iris/ReplicationSystem/ReplicationFragmentUtil.h"
#endif // UE_WITH_IRIS

Register the fragments:

#if UE_WITH_IRIS
void OWNINGCLASS::RegisterReplicationFragments(UE::Net::FFragmentRegistrationContext& Context, UE::Net::EFragmentRegistrationFlags RegistrationFlags)
{
	Super::RegisterReplicationFragments(Context, RegistrationFlags);

	// Build descriptors and allocate PropertyReplicationFragments for this object
	UE::Net::FReplicationFragmentUtil::CreateAndRegisterFragmentsForObject(this, Context, RegistrationFlags);
}
#endif // UE_WITH_IRIS

Add support in .Build.cs:

SetupIrisSupport(Target);

Reference: https://dev.epicgames.com/community/learning/tutorials/Xexv/unreal-engine-experimental-getting-started-with-iris

doesn't need changes