Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
This PR represents the final updates for our next NGO v2.0.0-exp.3 package released.
It primarily merges recent updates to the develop-2.0.0 branch that includes:
Changing the runtime SDK tests from public to internal
Updating how message indices are determined
Some larger adjustments to NetworkTransform when NetworkRigidbodyBase based components have UseRigidbodyForMotion set:
Parenting for pure physics based NetworkObject components now is done through attaching two bodies via FixedJoint.
The required documentation updates have been noted in the spreadsheet of things to be updated and reviewed (for internal --> contact nstephens for a link to this if you don't have this and would like to review).
The v2.0.0 recommended way to "parent" physics objects (i.e. things that use the Rigidbody for state and motion updates when using a NetworkTransform) will be to use a FixedJoint (or make a customized NetworkRigidbodyBase with one of the several other Joint types).
The "parent" Rigidbody's NetworkRigidbodyBase tracks all attached Rigidbodies.
"Children"/Attached Rigidbodies no longer independently check for transform state updates to synchronize each network tick.
The caveat to this is if a child is teleporting, then it runs through the normal network tick state update process.
Upon a "parent" Rigidbody's NetworkTransform detecting a transform state update and after sending its state update, it will parse through all attached Rigidbodies to have them check their NetworkTransform's state (which should have updated since the parent did) and send a synchronization update.
This is to assure the parent and child/children keep network tick synchronized with state updates to assure non-authority instances keep visually synchronized (properly).
Changelog
Added: NetworkRigidbodyBase.AttachToFixedJoint and NetworkRigidbodyBase.DetachFromFixedJoint to replace parenting for rigid bodies that have NetworkRigidbodyBase.UseRigidBodyForMotion enabled.
Fixed: Issue where non-authoritative rigid bodies with NetworkRigidbodyBase.UseRigidBodyForMotion enabled would constantly log errors about the renderTime being before StartTimeConsumed.
Testing and Documentation
Integration Tests (MTT-8618).
No documentation changes or additions were necessary.
This PR represents the final updates for our next NGO v2.0.0-exp.3 package released. It primarily merges recent updates to the develop-2.0.0 branch that includes:
NetworkTransform
whenNetworkRigidbodyBase
based components haveUseRigidbodyForMotion
set:NetworkObject
components now is done through attaching two bodies viaFixedJoint
.Rigidbody
for state and motion updates when using aNetworkTransform
) will be to use aFixedJoint
(or make a customizedNetworkRigidbodyBase
with one of the several other Joint types).NetworkRigidbodyBase
tracks all attached Rigidbodies.NetworkTransform
detecting a transform state update and after sending its state update, it will parse through all attached Rigidbodies to have them check theirNetworkTransform
's state (which should have updated since the parent did) and send a synchronization update.Changelog
NetworkRigidbodyBase.AttachToFixedJoint
andNetworkRigidbodyBase.DetachFromFixedJoint
to replace parenting for rigid bodies that haveNetworkRigidbodyBase.UseRigidBodyForMotion
enabled.NetworkRigidbodyBase.UseRigidBodyForMotion
enabled would constantly log errors about the renderTime being beforeStartTimeConsumed
.Testing and Documentation