Skip to content

chore: Merge develop 2.0.0 into exp.3#2933

Merged
NoelStephensUnity merged 16 commits intorelease/2.0.0-exp.3from
chore/merge-develop-2.0.0-into-exp-3-first
May 30, 2024
Merged

chore: Merge develop 2.0.0 into exp.3#2933
NoelStephensUnity merged 16 commits intorelease/2.0.0-exp.3from
chore/merge-develop-2.0.0-into-exp-3-first

Conversation

@NoelStephensUnity
Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity commented May 22, 2024

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.

NoelStephensUnity and others added 5 commits May 21, 2024 13:29
* update

Added the MessageTypeDefines ordering class that orders messages based on the NetworkMessageType.

* test

Fixing issue with tests using their own message provider.
Fixing a few more tests that don't need the message ordering or count verification stuff to be running.
Removed the message ordering related tests since this it was no longer needed.
Use tick offset.
Change the ticks ago based on whether DAHost or CMBService.
* changing all test public api to internal

* updating changelog

* additional changes

---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review May 22, 2024 20:48
@NoelStephensUnity NoelStephensUnity requested review from a team as code owners May 22, 2024 20:48
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 22, 2024 21:37
Migrated non-authority NetworkTransform updates to the pre late update to more align with how it is handled in v1.x.
Added NetworkRigidbodyBase reference to NetworkObject.
For now, added the ability to add a fixed joint when parenting two NetworkObjects with NetworkTransforms and NetworkRigidbodies that both have UseRigidBodyForMotion set to true (i.e. Rigidbody has no concept of "local space" motion).
Change the FixedJoint approach so it does not require parenting.
The "parent" rigid body now updates its children in NetworkTransform when the "parent's" state is updated in order to keep both parent and children state updates synchronized on the same network tick.
Added NetworkObject.CurrentParent that is set when a NetworkObject is parented.
NetworkObject.NetworkTransform is now NetworkObject.NetworkTransforms (a single NetworkObject can have many NetworkTransforms).
NetworkObject.NetworkRigidbodybase is now NetworkObject.NetworkRigidbodies (a single NetworkObject can have many NetworkRigidbodybase components).
Adding COM_UNITY_MODULES_PHYSICS wrappers around NetworkObject.NetworkRigidbodies.
wrapping some physics dependent properties in #if COM_UNITY_MODULES_PHYSICS.
Last missed NetworkRigidbodies needed wrapping in #if COM_UNITY_MODULES_PHYSICS
Only invoke DetachFromFixedJoint if HasAuthority is true during despawn.
Fixing issue where NetworkTransforms updated during FixedUpdate can have a render time that is slightly earlier than the start time. The delta between the two is typically in the nano to pico seconds range.

This first pass approach to resolve this issue is to just cast the two double properties to floats prior to subtracting one from the other in order to reduce that level of granularity of the delta between the two.
Adding some change log entries.
Unnamed and named messages now allow you to send a client id list of 1 on a client side if the client id is the server.

When registering a named message that is already registered, if the log mode is set to developer then a warning will be logged to the console informing the user they are overwriting the existing registration callback.
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 28, 2024 22:33
removing "auto-added" random namespace.
Allow DAHost to send to multiple clients for now.
@NoelStephensUnity NoelStephensUnity merged commit 751f185 into release/2.0.0-exp.3 May 30, 2024
@NoelStephensUnity NoelStephensUnity deleted the chore/merge-develop-2.0.0-into-exp-3-first branch May 30, 2024 16:03
NoelStephensUnity added a commit that referenced this pull request May 31, 2024
* chore: distributed authority UI displays dependent upon multiplayer SDK package (#2875)

* update

Renaming Session Mode to Network Topology.
This includes any related properties or XML API documentation references.

Adding package dependent conditional define MULTIPLAYER_SDK_INSTALLED that is defined when the com.unity.services.multiplayer package is installed to the editor assembly definition file.

This removes the custom property drawer since it appears the default enum flag drawer visual bug is resolved in Unity 6.

incrementing the version change

* feat: expose the UTP connect (#2935)

* feat: expose the UTP connect payload

* pass accept payload

* fix formatting

* make Connect and m_Driver protected

* remove payload output

* chore: Merge develop 2.0.0 into exp.3 (#2933)

* feat: enum ordered message versioning  (#2929)

* chore: migrate tests from public to internal (#2930)

* update

Added the MessageTypeDefines ordering class that orders messages based on the NetworkMessageType.
Use tick offset.
Change the ticks ago based on whether DAHost or CMBService.
Changing all test public api to internal
Adding FixedJoint attach and detach methods to NetworkRigidbodyBase.

* test

Fixing issue with tests using their own message provider.
Fixing a few more tests that don't need the message ordering or count verification stuff to be running.
Removed the message ordering related tests since this it was no longer needed.


---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>

* update

Migrated non-authority NetworkTransform updates to the pre late update to more align with how it is handled in v1.x.
Added NetworkRigidbodyBase reference to NetworkObject.
For now, added the ability to add a fixed joint when parenting two NetworkObjects with NetworkTransforms and NetworkRigidbodies that both have UseRigidBodyForMotion set to true (i.e. Rigidbody has no concept of "local space" motion).

* update

Change the FixedJoint approach so it does not require parenting.
The "parent" rigid body now updates its children in NetworkTransform when the "parent's" state is updated in order to keep both parent and children state updates synchronized on the same network tick.
Added NetworkObject.CurrentParent that is set when a NetworkObject is parented.
NetworkObject.NetworkTransform is now NetworkObject.NetworkTransforms (a single NetworkObject can have many NetworkTransforms).
NetworkObject.NetworkRigidbodybase is now NetworkObject.NetworkRigidbodies (a single NetworkObject can have many NetworkRigidbodybase components).

* fix

Adding COM_UNITY_MODULES_PHYSICS wrappers around NetworkObject.NetworkRigidbodies.

* fix

wrapping some physics dependent properties in #if COM_UNITY_MODULES_PHYSICS.

* fix

Last missed NetworkRigidbodies needed wrapping in #if COM_UNITY_MODULES_PHYSICS

* fix

Only invoke DetachFromFixedJoint if HasAuthority is true during despawn.

* fix

Fixing issue where NetworkTransforms updated during FixedUpdate can have a render time that is slightly earlier than the start time. The delta between the two is typically in the nano to pico seconds range.

This first pass approach to resolve this issue is to just cast the two double properties to floats prior to subtracting one from the other in order to reduce that level of granularity of the delta between the two.

---------

Co-authored-by: Frank Luong <100299641+fluong6@users.noreply.github.com>

* chore: add NGO 2.0.0-exp.3 version and date to changelog (#2937)

adding release version and date to changelog

* removing "unreleased" tag

* chore: update changelog in ngo 2.0.0 exp.4 (#2939)

* updating changelog

* bumping ngo version in package json

* adding unreleased section back

---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
Co-authored-by: Dominick <dominick@schroer.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants