Commit Graph

28 Commits

Author SHA1 Message Date
louisphilippe seguin
5fe2ef2b41 Iris
* Added PostInit callback to UNetObjectFactory
* Moved PostInit code from bridges to their respective factory

#rnx
#rb Mattias.Hornlund

[CL 36390399 by louisphilippe seguin in 5.5 branch]
2024-09-18 10:30:30 -04:00
louisphilippe seguin
149844147d Iris:
* 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]
2024-09-12 15:23:12 -04:00
louisphilippe seguin
aa93a84507 Iris
* Demystify BeginReplication functions in the bridges by renaming them to what type of replicated object they create.
* Renamed FCreateNetRefHandleParams to FRootObjectReplicationParams.
* Removed FCreateNetRefHandleParams from SubObject BeginReplication function. All of the params could only be set on Root Objects.

#rb Mattias.Hornlund

[CL 35824786 by louisphilippe seguin in ue5-main branch]
2024-08-27 10:29:26 -04:00
louisphilippe seguin
c970144aed Iris
* Fix dormant objects getting replicated if one of their push model property was set dirty or force net update was called on them.
* Added dormancy iris unit test

#jira UE-219859
#rnx
#rb Peter.Engstrom

[CL 35032278 by louisphilippe seguin in ue5-main branch]
2024-07-23 16:27:37 -04:00
peter engstrom
51b5988e5f Iris - Perform all delta compression baseline invalidation based on conditional changes in FReplicationConditionals. Invalidate baselines for the entire object hierarchy if a condition change are affecting properties in subobjects too.
#rb bradley.heath

[CL 34749765 by peter engstrom in ue5-main branch]
2024-06-28 16:58:06 -04:00
peter engstrom
c2c456912e Iris - Minor test framework improvements.
#rnx
#rb bradley.heath

[CL 34087828 by peter engstrom in ue5-main branch]
2024-06-04 03:39:03 -04:00
mattias hornlund
c69dfc359e Iris
- Implemented support for capturing and caching CreationInfo which allows us to capture final snapshot of replicated objects data including information we need to send creation info to clients. This allows flushing of replicated state and rpcs even if the owning actor is destroyed.
 - Iris now supports flushing state for Networked objects created and destroyed during the same frame.
 - Autoflush behavior can be disabled by cvar net.Iris.EnableFlushReliableRPCOnDestroy 0

#rb Peter.Engstrom

[CL 33258927 by mattias hornlund in ue5-main branch]
2024-04-26 05:10:23 -04:00
mattias hornlund
5c8f02c693 Iris
- Reduced overhead when calling PreReplcate functions as we do it for many objects.

#rb Peter.Engstrom

[CL 32892012 by mattias hornlund in ue5-main branch]
2024-04-11 11:27:02 -04:00
louisphilippe seguin
ce71ec31fd Iris
* Added NetRefHandle::GetInvalid() and replaced existing calls to FNetRefHandle() to GetInvalid()

#rnx
#rb Peter.Engstrom

[CL 31426712 by louisphilippe seguin in ue5-main branch]
2024-02-13 10:11:30 -05:00
louisphilippe seguin
75ee0efac9 Iris
* Added unit test for setting a push model property dirty from inside PreNetUpdate

#rnx
#rb Mattias.Hornlund

[CL 30237765 by louisphilippe seguin in ue5-main branch]
2023-12-11 09:52:34 -05:00
mattias hornlund
cddb73ede1 Iris
- Implemented optimized path only dequantizing dirty members of received statedata during apply

#rb Peter.Engstrom

[CL 28666208 by mattias hornlund in ue5-main branch]
2023-10-11 11:31:45 -04:00
louisphilippe seguin
9927292699 Iris:
* Added unit test calling RPCs on subobjects

#rb Mattias.Hornlund
#rnx

[CL 28502556 by louisphilippe seguin in ue5-main branch]
2023-10-05 12:04:52 -04:00
louisphilippe seguin
15e7786970 Iris
* Iris creation data will now replicate the true Outer of replicated subobjects.
* Refactored CallWriteNetRefHandleCreationInfo and made CallWriteNetRefHandleDestructionInfo.

#jira UE-127405, FORT-650140, FORT-650133, FORT-650141
#rb Mattias.Hornlund
#rnx

[CL 27798306 by louisphilippe seguin in ue5-main branch]
2023-09-12 13:20:56 -04:00
peter engstrom
ecc9028539 Iris - COND_SkipReplay properties are now treated as having a lifetime condition. Added missing tests for various lifetimeconditions.
#rnx
#rb mattias.hornlund

[CL 27627972 by peter engstrom in ue5-main branch]
2023-09-06 04:19:40 -04:00
peter engstrom
3283d0c1d3 Iris - Allow sending dynamic objects in SoftObjectPtr.
#rb mattias.hornlund

[CL 27408909 by peter engstrom in ue5-main branch]
2023-08-28 08:18:13 -04:00
mattias hornlund
6b55a9269d Iris
- Added friend declaration for inlined subclass to comply with recent compilers.

#rb Peter.Engstrom

[CL 27407575 by mattias hornlund in ue5-main branch]
2023-08-28 05:06:22 -04:00
mattias hornlund
797dde7c6b Iris
- Implemented initial support for being able to skip over data for objects that fail to be instantiated

#rb Peter.Engstrom

[CL 27371360 by mattias hornlund in ue5-main branch]
2023-08-25 05:15:41 -04:00
louisphilippe seguin
a45acac5be Iris
* Poll configs are now set using Frequency (updates per second) instead of frames between polls.
* This allows the poll configs to work with any type of server tick rate
* Added ability to recover a given object's poll frequency via GetPollFrequencyOfRootObject
* ActorReplicationBridge will now listen to changes in server tick rates and reinitalize the poll frame updates of all objects via ReinitPollFrequency()

#jira UE-185786
#rb Peter.Engstorm
#rnx

[CL 25894242 by louisphilippe seguin in ue5-main branch]
2023-06-09 11:12:03 -04:00
louisphilippe seguin
8b3d0a80e5 Iris
* Formalize the concept of ForceNetUpdate by splitting MarkDirty and ForceNetUpdate into seperate lists.
* Now dirty objects will not be forced to be polled immediately anymore. It's only if you call ForceNetUpdate that you can skip your polling frequency.
* Another exeception is when a subobject gets added to a root object. There we are forcing a call to ForceNetUpdate.
* Added code to ensure that only the currently updated object can be marked dirty during the poll phase.

#jira UE-181952
#rb Peter.Engstorm, Mattias.Hornlund
#rnx

[CL 25814811 by louisphilippe seguin in ue5-main branch]
2023-06-06 09:49:57 -04:00
louisphilippe seguin
9bcd7d97a7 Iris
* Added unit tests for RPC sending

#rb Mattias.Hornlund
#rnx

[CL 25355234 by louisphilippe seguin in ue5-main branch]
2023-05-05 11:23:31 -04:00
louisphilippe seguin
1d3c76e632 Iris
* Added GridFilter unit tests
* Encapsulated RepTag creation hack for unit tests
* Fix FragmentGridFilter reading world location fragment using wrong FVector unit type

#rb Peter.Engstorm
#rnx

[CL 25214436 by louisphilippe seguin in ue5-main branch]
2023-04-27 10:37:07 -04:00
louisphilippe seguin
75e3dfc0f5 Fix ensures about fragmentless netobjects in ReplicationSystemTests
#rb Ryan.Gerleve

[CL 24386316 by louisphilippe seguin in ue5-main branch]
2023-02-23 14:32:38 -05:00
peter engstrom
43e1614b0d Added ELifetimeCondition COND_Dynamic support. Added unit tests for Iris and functional tests for replication system agnostic testing.
COND_Dynamic allows for a property to decide its actual replication condition after instantiation of the actor/component rather than be the same for all instances. The condition can be changed using the macros DOREPDYNAMICCONDITION_INITCONDITION_FAST, when used in the object's GetReplicatedCustomConditionState implementation, or DOREPDYNAMICCONDITION_SETCONDITION_FAST in any other place where it's appropriate to change the condition. If the condition is never modified, thus remaining COND_Dynamic, the property will always replicate when changed. It's possible to use the DOREPCUSTOMCONDITION_ macros too on properties with this condition.

#jira UE-122444
#preflight 63eb3ca1923476b686190e5a
#rb louisphilippe.seguin, ryan.gerleve, mattias.hornlund, brian.bekich

[CL 24307287 by peter engstrom in ue5-main branch]
2023-02-19 08:39:17 -05:00
peter engstrom
d0806c1a43 Iris - Don't destroy subobjects that we didn't new and actors we're not allowed to.
This fixes various crashes related to deleting default subobjects and such.

#jira UE-174664
#rb mattias.hornlund
#preflight 63cfeb52d83c1837b1974232

[CL 23831933 by peter engstrom in ue5-main branch]
2023-01-24 11:24:58 -05:00
Peter Engstrom
3206f7ab64 Iris - Renamed Iris file NetHandle.h to NetRefHandle.h
#jira UE-170410
#rnx
#rb trivial
#preflight 6391db0fbb6fefa47274c8a6

[CL 23445192 by Peter Engstrom in ue5-main branch]
2022-12-08 07:55:14 -05:00