* update
This contains the updates for PR-2820 (Anticipated NetworkVariable and NetworkTransform) with minor adjustments based on updates in the v2.0.0 branch.
Updating the package version.
Adding updated changelog entries.
up-port of PR-2872
up-port of PR-2874.
updating change log file
* fix
this fixes the issue where a quaternion could potentially be close to 1.0 but off by a very very very small amount. Under this scenario, we Normalize the quaternion prior to invoking MoveRotation.
Send InSceneNetworkObjectsSpawned and InternalNetworkSessionSynchronized NetworkBehaviour notifications on the server, host, and session owner side when first starting a session.
* fix
Fixing issue when using half float precision and ownership changes, the current base position needs to be synchronized.
* fix
This fixes the issue of not invoking OnClientConnected when scene management is enabled for the session owner of a distributed authority session.
* update
Minor reduction in allocs while processing received messages (with the asteroids stress test this removes a regular 83kb allocation that occurs when processing received messages).
* update
Making a client's owned objects be returned as an array as opposed to a list for performance purposes.
* update
Adding change log entries.
* update
Adding the PR number to the changelog entries.
* fix
Cast the local variable so message hooks based on type still work.
* style
adding and removing whitespaces...
* style
removing using statement for generic collections.
* style
Fixing spelling of private dictionary.
* update
Moving around how distributed authority mode is checked.
First pass of getting UnityTransport to be able to dictate what network topology is currently available (during a session).
* update
minor updates to NetworkTransform
* update
Only display the Start Client option in the inspector view when distributed authority mode is selected.
* updte
Adding event for when a session owner is promoted.
* update
adding a few more change log entries.
* test fix
Adding the same changes made to UnityTransport to MockTransport.
* update
Additional control flow for topology usage check
* fix
Fixing issue with NetworkObject ownership properties not showing up in the inspector view.
Renaming the version define from MULTIPLAYER_SDK_INSTALLED to MULTIPLAYER_SERVICES_SDK_INSTALLED.
Removing the components folder that was used for the assembly that no longer exists.
* update
Modifying the EveryoneRpcTarget so that it uses the NotAuthorityRpcTarget and AuthorityRpcTarget when in distributed authority mode.
* update
handling minor merge conflict
* fix
Fixing issue with motion based on very small linear velocity values.
* update
Adding 2D rigibody threshold calculations.
Disabling the auto session owner promotion in distributed authority host mode.
* fix and style
Initializing NetworkManager dependent properties within the OnNetworkSpawn of the NetworkRigidbodyBase class.
Removing whitespaces from NetworkConnectionManager.
* update
adding change log entries
* fix
declaring var rotationThreshold when there is no physics package installed.
* update
reverting previous change. Did another deep profile with Unity 6 (5f1) and this area does not seem to be causing any allocations.
* update
Adding authority mode selection drop down and exposing the NetworkTransformEditor OnEnable method (making it virtual) so the control can be derived from and extended.
* update
adding changelog entry for NetworkTransformEditor adjustment.
* update
make sure to update to Owner authority during initialization.
* fix
We are starting the message versioning after the more recent session owner message.
* update
adding change log entry
* update
adding PR number to changelog entry.
* 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>
* changing all test public api to internal
* updating changelog
* additional changes
---------
Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
* 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.
* fix
up-port of #2923 fix for in-scene placed NetworkObjects getting destroyed if a client disconnects early.
* test
adding test to validate fix
* test fix
Fixing issue of checking HasAuthority via NetworkObject as opposed to NetworkBehaviour
* update
Skip initial in-scene object spawn pass and sending service the initial synchronization when restoring a session.
Allow same scene handle entries when restoring a session.
Don't spawn the player during connection approval during session restore.
Integration test helpers registers validation handler to exclude InitTestScene for all clients.
NetworkSceneManager always sends scene events to the service.
For now, session owner always uses PostSynchronizationSceneUnloading when processing a session restore synchronization.
* update
Migrated components to runtime.
Added some low hanging fruit updates to NetworkTransform and NetworkTransformMessage to help optimize cpu consumption and reduce GC allocations.
Disabled the ticks ago since RTT seems to only update when a client sends packets.
* test
Made adjustments to tests and testproject assets.
* fix
Fixing scenario where m_UseRigidbodyForMotion is not defined and was being used to register for updates.
Removed some whitespaces.
Wrapping all fixed update related methods and properties in NetworkManager within #if COM_UNITY_MODULES_PHYSICS.
Adjusting the ILPP for NetworkBehaviour to scan the Runtime assembly too.
Adjusting the early exit for lack of observer count to only happen in DA mode.
* test fix
Sometimes the ClientDisconnectMultipleClients can exceed more than 2s (but seemingly less than 5) before receiving all events.
Reverting the OnUpdate change to TransformInterpolationObject's back to Update as both instances need to update regularly for this test.
Fixing issue with unreliable delta full state synchronization.
* update
adding pre and post spawn methods.
clearing the m_ChildNetworkBehaviours on Awake.
* update
adding change log entries
* update
Needed to add a NetworkManager ref into the pre spawn method.
Needed to account for locally spawning.
* test
Adding test that validates the pre spawn and post spawn methods are invoked and that order of operations for OnNetworkSpawn invocation is not an issue with OnNetworkPostSpawn invocation.
* style
updating comments
* style
updating comments a bit more
* test
Migrating OnDynamicNetworkPreAndPostSpawn into its own class to avoid interfering with the generic tests.
* style
removing property no longer used and remove LF/CR
* update and test
Added NetworkBehaviour.OnNetworkSessionSynchronized and NetworkBehaviour.OnInSceneObjectsSpawned methods.
Added test to validate the above methods.
Added assets for the test to validate the above methods.
* update
Merge fix
* test
Updates for distributed authority testing.
* Update CHANGELOG.md
Adding v2.0.0 PR
* style
removing white spaces
Minor NetworkTransform fix to prevent error logging of messages received by a previous owner.
If NetworkTransform is not active then don't check for updates during the tick update.
* fix
Fixing issue where parenting synchronization on the authority side was not properly handling the scenario where a NetworkObject is parented under a GameObject (with or without auto object parent sync enabled).
* fix
Fixing issue where parenting synchronization on the non-authority side was not properly handling the scenario where a NetworkObject is parented under a GameObject (with or without auto object parent sync enabled).
* update
migrate when to apply in local space above the parenting check.
* test
Adding an integration test to validate an in-scene placed NetworkObject's initial synchronization when parented under a GameObject. This also test both scenarios where the in-scene placed NetworkObject does and does not have a NetworkTransform.
* fix
removing white space after added enabled field during a cherry pick merge.
* style
removing unused using directive.
* update
updating some package versions
* update
updating the version of linux used
* Update CODEOWNERS
just catching up the CODEOWNERS v2.0 develop branch to changes in v1.0 branch
* update
adding changelog entry
* Update CHANGELOG.md
* update
make the unity 6 editor the target
* update
updating the target editor to use for all tests
* update
Update changes from PascalCasing to camelCasing.
Updating the manifest.json.
Updating the ProjectVersion.
* fixes and update
fixing an issue with one of the scene integration tests.
Updating the addressable asset settings for Unity 6 compatibility.
other minor updates.
* update
NGO version number.
Added a large chunk of the changelog entries.
Fixing issue with null in-scene placed NetworkObject checking when session owner is assigned.
Updating scene management (client side) to send the SynchronizeComplete message to all connected clients (so they will redistribute NetworkObjects evenly).
When a session owner leaves, any remaining in-scene placed NetworkObjects belonging to the session owner changes ownership over to the newly promoted session owner.
(temporary solution for this type of ownership change)
Fixing some additional issues with Rigidbody testing and assuring we are comparing the correct position and rotation. With NetworkTransformOwnershipTests, it turned out that the movement of the non-kinematic body was giving the Rigidbody a linear velocity under certain conditions.
Removing the warning about resetting dirty when not initialized during NetworkVariableTests (removing a couple thousand log messages).
Since the service is now consuming the initial synchronize event, updated how in-scene objects are spawned initially.
Fixing issue with some rigid body tests.
Reverting change to NotMeTarget as it impacts UniversalRpc tests that I need to review with Kitty to determine the best way to modify.
Consolidated NetworkRigidbody and NetworkRigidbody2D into single base class that provides more customizable options for users.
NetworkObject no longer implements the Update method in order to check for object scene migration. Instead, it is registered in a table that is updated in the late update prior to sending any messages about objects migrating into a new scene. This removes the added processing per NetworkObject for scenarios where the NetworkObject plays a more passive role (i.e. a sinlge NetworkBehaviour with one or more NetworkVariables).
Fixed issue with parenting when using Rigidbody motion in NetworkTransform.
Fixed issue with NotMeRpcTarget when in distributed authority mode.
excluding certain tests from the minimal project pass.
minor fix for initial in-scene NetworkObject spawning until service fully consumes the initial Synchronize event.
Excluding certain tests from the tools integration test project tests.
Increasing the primary test project's 2023 editor to 2023.2 as opposed to 2023.1.