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.
MIT License
2.1k
stars
430
forks
source link
fix: ownership change halfprecision, session owner onclientconnected, and minor optimizations #2948
This PR resolves issues with the current base position not being synchronized properly when using half float precision and ownership changes as well as the OnClientConnected callback not being triggered on a session owner when create a new distributed authority session.
It also includes some minor message processing optimizations and (for performance purposes) the clients owned objects is now returned as an array.
This also includes some final minor updates in preparation for pre-release.
fix: #2800
Changelog
Added: Event NetworkManager.OnSessionOwnerPromoted that is invoked when a new session owner promotion occurs.
Added: NetworkRigidBodyBase.GetLinearVelocity and NetworkRigidBodyBase.SetLinearVelocity convenience/helper methods.
Added: NetworkRigidBodyBase.GetAngularVelocity and NetworkRigidBodyBase.SetAngularVelocity convenience/helper methods.
Fixed: Issue when NetworkTransform half float precision is enabled and ownership changes the current base position was not being synchronized.
Fixed: Issue where OnClientConnected not being invoked on the session owner when connecting to a new distributed authority session.
Fixed: Issue where Rigidbody micro-motion (i.e. relatively small velocities) would result in non-authority instances slightly stuttering as the body would come to a rest (i.e. no motion). Now, the threshold value can increase at higher velocities and can decrease slightly below the provided threshold to account for this.
Changed: The client's owned objects is now returned (NetworkClient and NetworkSpawnManager) as an array as opposed to a list for performance purposes.
Changed: NetworkTransfrom.TryCommitTransformToServer to be internal as it will be removed by the final 2.0.0 release.
Changed: NetworkTransformEditor.OnEnable to a virtual method to be able to customize a NetworkTransform derived class by creating a derived editor control from NetworkTransformEditor.
Testing and Documentation
Added integration tests (wip).
Includes edits to existing public API documentation.
This PR resolves issues with the current base position not being synchronized properly when using half float precision and ownership changes as well as the
OnClientConnected
callback not being triggered on a session owner when create a new distributed authority session.It also includes some minor message processing optimizations and (for performance purposes) the clients owned objects is now returned as an array.
This also includes some final minor updates in preparation for pre-release.
fix: #2800
Changelog
NetworkManager.OnSessionOwnerPromoted
that is invoked when a new session owner promotion occurs.NetworkRigidBodyBase.GetLinearVelocity
andNetworkRigidBodyBase.SetLinearVelocity
convenience/helper methods.NetworkRigidBodyBase.GetAngularVelocity
andNetworkRigidBodyBase.SetAngularVelocity
convenience/helper methods.NetworkTransform
half float precision is enabled and ownership changes the current base position was not being synchronized.OnClientConnected
not being invoked on the session owner when connecting to a new distributed authority session.NetworkClient
andNetworkSpawnManager
) as an array as opposed to a list for performance purposes.NetworkTransfrom.TryCommitTransformToServer
to be internal as it will be removed by the final 2.0.0 release.NetworkTransformEditor.OnEnable
to a virtual method to be able to customize aNetworkTransform
derived class by creating a derived editor control fromNetworkTransformEditor
.Testing and Documentation