Граф коммитов

2723 Коммитов

Автор SHA1 Сообщение Дата
Noel Stephens 490fb939a5
fix: networkanimator only updates observers backport (#3058)
* fix

only send animation updates to observers.

* test

validates that NetworkAnimator only sends animation updates to observers.

* update

Added changelog entry
2024-09-11 09:40:28 -04:00
Noel Stephens 39818f239d
fix: exception thrown when rpc received for depsawned object (back-port) (#3055)
* fix

We should not throw an exception if an RPC is received and the target NetworkObject does not exist as it could have been despawned.

* update

Adding changelog entry

* update

adding changelog entry PR number.
2024-09-09 19:13:08 +00:00
Larus Olafsson 67b27b7105
fix: Add size validation to named and unnamed message sending (#3043)
* Add better error messages with too big named message sizes

* also validate unnamed message sizes

* add to changelog

* fix pr number

* Update CHANGELOG.md

* styles

adding whitespace

---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
2024-09-06 23:05:53 +00:00
Noel Stephens f41fb30353
fix: player prefab null exception when using prefabhash connection approval (backport-3042) (#3046)
* fix

back port of #3042 fix

* test

Test updates to validate the fix.

* update

adding changelog entry
2024-09-06 17:33:53 -05:00
Frank Luong 2da5a98036
chore: Upgrading unity-downloader-cli (#3048)
* upgrading unity-downloader-cli

* upgrading unity-downloader for all jobs

* upgrading to use pip3

* fixing permission issue

* removing the version check
2024-09-06 09:11:52 -05:00
Noel Stephens 505261c72c
fix: allow the check for a NetworkObject component on NetworkBehaviours to be disabled (Back Port) (#3034)
* update

Add editor UI and additional NGO setting.

* update

Add check to see if we should perform the check for NetworkObject.

* update

Add the changelog entry
2024-09-03 14:37:41 -04:00
Noel Stephens 4470a4796d
Update CODEOWNERS
Adding frank and myself to the codeowners
2024-09-02 17:06:27 -05:00
Noel Stephens a597b9f7ca
fix: prevent exception when showing despawned or destroyed NetworkObject (#3029)
* fix

Adding protections against exceptions in the NetworkSpawnManager.HandleNetworkObjectShow method.

* test

validate the fix

* update

adding changelog entry.

* update

adding PR number to changelog entry.

* fix and style

Removing whitespace
Adding 2022.3 define for find objects.
2024-08-26 17:54:03 -05:00
Noel Stephens ca23b3c67f
fix: unity collections 2-2-x support in 2022.3 with NGO v1.x.x (#3033)
* update

Adding support for changes to collections in v2.2.x.

* update

Adding support for changes to collections in v2.2.x.

* update

Adding changelog entry
2024-08-26 20:46:54 +00:00
Noel Stephens 6d43f0a3b1
fix: Stop checking hierarchy changed in playmode (#3027)
* fix

Backport fix of #3026

* update

adding changelog entry

* update

adding PR number to changelog entry
2024-08-26 14:40:37 -05:00
Frank Luong 142e757a55
chore: NGO 1.11.0 merge back to develop NGO develop (#3024)
* updating changelog and package.json

* adding unreleased section to changelog
2024-08-26 15:59:00 +01:00
Frank Luong beb08e8441
fix: adding null checks when accessing NetworkBehaviour (#3011)
* adding null checks when accessing NetworkBehaviour

* updating PR number in changelog
2024-08-19 14:51:43 -04:00
Noel Stephens 231b36d89c
fix: collections not detecting deltas backport to v1.x.x (#3005)
* fix

Fixing some of the collections issues.
Adding a unified permissions error.
Replacing throw exceptions with logging errors and returning.

* tesat

adjustments for replacing throw exception and added internal unified permissions write error.

* fix

Adjustments made due to other issues with direct assignment.

* fix

back port typo.

* style

removing using directive.

* fix

Mark that we have a previous value for disposing when destroyed.

* fix

This fixes an issue with duplicating nested lists, hashsets, and dictionaries.

* test

This is the first set of tests for Lists, including nested, that test using base types and INetworkSerializable.
Still have HashSet and Dictionary to cover.

* test

Added Dictionary and HashSet to the tests.

* style

Removing whitespaces

* update

adding changelog entries

* update

Adding missed change log entries.
2024-08-13 18:01:42 +00:00
Noel Stephens b2f5e84591
fix: dual triggers generating false state transition [MTTB-48] (#2999)
* fix

This fixes the issue where a trigger that transitions to a state with a trigger that transitions back to the original state could cause NetworkAnimator to generate a false layer to layer state transition which would not only generate an additional message after the original trigger message, but would cause the non-authority instances to log a warning message.

* test - manual

This includes additional assets needed to test this fix manually as well as some of the assets included will be used in an integration test.

* test

Adding test for the dual trigger scenario.

* style

Adding additional comments about the update.
2024-08-07 02:38:39 +00:00
Noel Stephens cb11580be5
fix: fixedstring byte writing and comparing (#2992)
* yupdate

Updating version of package and changelog version

* fix

removing the [GenerateSerializationForType(typeof(byte))] attributes.

* fix

fixing the issue of a missing byte serializer for fixedstrings.

* style

removing whitespace

* Update CHANGELOG.md
2024-08-06 10:36:58 -04:00
Amy Reeve 3863794e91
fix: Improve API doc for OnGainedOwnership and OnLostOwnership (#2996) 2024-08-05 11:21:42 +01:00
Frank Luong dbf6b03d8e
chore: NGO 1.10.0 merge back to develop NGO develop (#2987)
* yupdate

Updating version of package and changelog version

* updating changelog

---------

Co-authored-by: NoelStephensUnity <noel.stephens@unity3d.com>
2024-07-29 21:56:11 +02:00
Noel Stephens 4400390273
fix: Realtime Network Stats Monitor Not Displaying RPC Metrics in Release Builds (#2980)
* fix

Adding UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE to all of the various dependencies required to enable RNSM tracking of RPC messages.

* update

adding change log entry
2024-07-19 19:13:27 +00:00
Noel Stephens f0db8179db
fix: scenemanager clean up ScenesLoaded after synch unloading of remaining scenes not used [back port] (#2977)
* fix

remove the scene from the scenesLoaded dictionary when there are remaining scenes to be unloaded.

* test

back ported test updates

* update

Adding change log entry
2024-07-18 14:43:09 -05:00
Ufabsther 7915bd4c44
fix: Added support for byte on NetworkVariable through codegen (#2953)
* fix: Added support for byte on NetworkVariable through codegen

the codegen wasn't picking byte  - it's because a variable of a type other than NetworkVariable<byte> (such as NetworkVariable<FixedString32Bytes>) is serializing a byte value as part of its delta serialization. Delta serialization was added in NGO 1.9, which is why it doesn't happen in previous versions. This code assumes the existence of a byte serializer, but if the user doesn't have a NetworkVariable<byte> in their code, the byte serializer won't be initialized by the codegen pass.
credits: Kitty Drapper

* fix: Converted serialization operation to their appropriate Safe counterparts

Fixed safety issue that would trigger exception on runtime

* fix

Using WriteByteSafe as opposed to WriteValueSafe.

* update

adding changelog entry

---------

Co-authored-by: NoelStephensUnity <noel.stephens@unity3d.com>
2024-06-25 12:12:38 -05:00
Nicklas Pingel cd154af132
chore: use xray for verifying package (#2944)
Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
2024-06-05 10:41:23 +02:00
Noel Stephens dc021c6067
fix: client side disconnect incorrect client count on host-server side [MTTB-135] (#2941)
* fix

This resolves the issue with the client count not being correct on the host or server side when a client disconnects itself from a session.

This also resolves the issue with the host trying to send itself a message that it has connected when first starting up.

Fixing issue with NetworkSceneManager finishing synchronization prior to the server connection timing out.

* test

Adding validation for the connected clients count on the server side when the client-side disconnects.
2024-06-03 15:33:09 -04:00
Noel Stephens 16448010b9
fix: In-scene placed NetworkObjects getting destroyed if early disconnect (#2923)
* fix

Fixes an issue where in-scene placed NetworkObjects could be destroyed if a connection failed.

* test

Adding test to validate fix
2024-05-14 14:50:47 +00:00
Noel Stephens 2b38d55d2d
fix: unreliable deltas half float synch jitter (#2922)
* fix

This fixes an issue with using unreliable state updates, half-floats, and NetworkDeltaPosition.

* test

Adding test to validate the fix for using half float precision with unreliable deltas.
2024-05-14 08:28:44 -05:00
samlucas-unity 66d4134f86
fix: Fix for NullReferenceException during client Shutdown (#2921)
* Fixed crash and added test for a message still existing in the message queue on shutdown.

* Fixing format errors.

---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
2024-05-10 18:50:18 +00:00
Noel Stephens f9c67313b4
fix: in-scene networkobject with networktransform synchronization when parented under gameobject [MTT-8402] (#2895)
* 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.

* style

Removing unused namespace

* update

Updating change log entry
2024-05-10 16:00:51 +01:00
Noel Stephens bcb891b5b2
fix: NetworkRigidbody2D not changing body type with authority [MTT-8510] (#2916)
* fix

This resolves the issue with Rigidbody2d not changing the body type based on changes to authority while also assuring the initial body type for Rigidbody2d is kinematic until spawned.

* test

Realized we needed an overhaul with our rigid body tests so I did a bit of refactoring.
Deleted the remaining of the completely commented out rigid body tests that are now being covered in the NetworkRigidbodyTests.
2024-05-09 09:46:12 -05:00
Noel Stephens cd6ead3ac0
feat: add pre and post spawn methods (#2906)
* 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.
2024-05-08 10:51:41 -05:00
Noel Stephens e3643cf74b
chore: merge 1.9.1 into develop (#2899)
* chore: tag change log (#2866)

* chore: merge develop into 1.9.0 release (#2873)

* test

Increasing timeout for 2 URPC tests that commonly timeout.

* style

adding comments

* update-temp

Running tests on only 2022.3

* style and test

Adjusting URPC tests.
Fixing naming convention violation.

* test

increase number of bytes to adjust under CorruptBytes pass.

* style

missing white space

* Revert "update-temp"

This reverts commit 0958d04dd5.

* chore: bumping to v1.9.1 initial package release version (#2887)

* chore

bump initial package version.

* update

bumping version in changelog

* style

adding white space

* Update CHANGELOG.md

Removing this as it was not accurate.
2024-04-25 17:39:16 -05:00
Amy Reeve b008929595
fix: API doc fixes from user feedback (#2878)
* Adding missing words for OnDestroy API doc

* Reference pointing to what?

* Improving remarks for OnServerStopped and OnClientStopped

* Updates to summary from review

* Formatting
2024-04-25 11:16:03 +00:00
Noel Stephens 76e6cb082e
chore: update code owners (#2889)
Adding Nicklas to code owners
2024-04-18 16:31:17 +00:00
Amy Reeve d97d968a47
fix: Update API docs for MaxPayloadSize (#2877)
* Update API docs for MaxPayloadSize

* Update to API remark following review
2024-04-17 16:55:57 +01:00
Noel Stephens d90292da99
chore: migrate 2830 allow null references in NetworkBehaviourReference and NetworkObjectReference (#2874)
* initial commit

* update

adding changelog entry

* update and style

Fixing some style issues along with property type issues.

* test

Adding some generalized testing to validate both NetworkBehaviourReference and NetworkObjectReference can be created using a null and serialized when null.

* update

Updating the changed description.

---------

Co-authored-by: Simone Guggiari <simogecko@gmail.com>
2024-04-05 16:06:01 -05:00
Noel Stephens 3ca359d05f
chore: migrate PR-2812 remove animator requirement (#2872)
* Do not require component Animator on NetworkAnimator.

* update

Adding changelog entry.

---------

Co-authored-by: jeffgamedev <jbrooks@gala.games>
Co-authored-by: Jeff Brooks <jeph.brooks@gmail.com>
2024-04-05 17:58:23 +00:00
Noel Stephens 5b156090ec
chore: replicate PR-2833 physics2d rigidbody2d fix (#2871)
* Fix physics2d not working without physics

* update

updating changelog

---------

Co-authored-by: Depri0n <151538332+Depri0n@users.noreply.github.com>
Co-authored-by: Deprion <Depri0n@yandex.ru>
2024-04-05 17:20:33 +00:00
Noel Stephens ac46fa7fda
fix: NetworkTransform synchronize position when half float precision is enabled (#2845)
* fix

Edge case fix for half float precision not getting the proper initial base offset.

* update

adding change log entry

* update

adding PR number

* test

updating some of the tests to reduce the verbosity of the debug output.
2024-04-05 16:09:59 +00:00
Henrik Poulsen 5dcc00cd7d
Use slough artifactory in CI Part 2 (#2867)
Co-authored-by: Sourcegraph <batch-changes@sourcegraph.com>
2024-04-05 11:26:17 +02:00
Kitty Draper b097d74947
fix: Fixed instability issues in the tests and optimized them so they would not take as long to run. (#2860) 2024-04-03 16:14:29 -05:00
Noel Stephens 0c70ae30b4
chore: add develop 2.0.0 to triggers and conventional pr (#2861)
* update

adding the develop-2.0.0 branch to triggers and conventional pr.

* Revert "update"

This reverts commit 77aa22e166.

* update

adding develop-2.0.0 to conventional PR

* update

adding to auto update

* Update autoupdate.yaml
2024-04-03 10:04:12 +00:00
Kitty Draper b9fe0d2048
feat: Added support for client anticipation in NetworkVariables and NetworkTransform and support for throttling functionality in NetworkVariables (#2820) 2024-03-27 19:19:56 +00:00
Kitty Draper 1fa39e171b
chore: release/1.8.1 merge to develop (#2831)
fix: Fixed compile error using IL2CPP builds with new [Rpc] attribute (#2824)
2024-03-22 00:13:24 +00:00
Noel Stephens ed867b52e1
fix: host not generating its own local client disconnect notification (#2822)
* fix

Assure the host generates a notification for the local host client no longer being connected when it shuts itself down.

* test

Include modification to the DisconnectTest to validate this fix.

Rewrote the SenderIdTest to be a bit more flexible with regard to waiting for the client disconnect event and not failing if it received anything afterwards.
Adding check for ConnectionEvent.ClientDisconnected for both test types.
Fixing issue with StopOneClient destroying the NetworkManager when destroy is set to false.
2024-03-12 21:12:29 +00:00
Nicklas Pingel 7a2f31a696
fix: Freeze rigidbody on Awake and interpolate based on ownership (#2838)
NetworkRigidbody is not checking for NetworkTransform.Interpolate value on ownership loss as it does on Awake, so it assumes that the NetworkTransform will treat the interpolation even if NetworkTransform.Interpolate is false.

NetworkRigibody set kinematic on a NetworkObject's rigidbody before it actually is spawned (on Awake) to prevent the transform from being changed before knowing the actual ownership of the object. NetworkRigidbody2D follow the same pattern
2024-03-11 09:37:04 -05:00
Nicklas Pingel c013f64104
fix: Avoid duplicate RPC invocation on host (#2834)
Host acts as both client and server.
Both the client target and the server target points to same instance
This results in two invocations on the host which is not expected
Checking that the server is host and skipping the RpcTarget invocation we avoid this situation
2024-03-01 10:00:13 +01:00
Frank Luong ade472ed84
chore: updating standards check bokken snapshots (#2825)
* updating standards check bokken snapshots

* chore: updating standards check bokken snapshots

* chore: updating standards check bokken snapshots
2024-02-08 01:35:07 -06:00
Noel Stephens d58ffb1d5b
fix: in-scene parenting WorldPositionStays transform synchronization without NetworkTransform [MTT-7856] (#2796)
* Test Fix

InSceneParentChildHandler was not adding the server side objects to check.

* fix

This fixes the issue with World Position Stays being set not working along this:
- The integration scene names not being added with complex nested children
- Parents and children were not being ordered as parent first then child

But now that this is fixed, the world position stays set to false no longer works (whack a mole).

Account for multiple children under any given parent for sorting.
Minor adjustment to how scale is synchronized with in-scene placed NetworkObjects.

* update

Improved SceneEventData parent sorting
2024-02-02 19:40:25 +00:00
Kitty Draper 21a0a1b701
feat: Better support for container types in NetworkVariable, including delta computation to save bandwidth. (#2813) 2024-02-01 21:11:22 +00:00
Noel Stephens 697b078da7
chore: legacy cleanup with some test adjustments (#2816)
* update

Move multiprocess tests out of test project assets into legacy folder so it is no longer included with our tests.

* test

Adjusting three tests to prevent inconclusive results.
2024-01-26 03:24:52 +00:00
Noel Stephens adcec184ac
chore: migrate NetworkTransform away from using named messages over to NetworkTransformMessage [MTT-7535] (#2810)
* update
Adding the NetworkTransformMessage
Expanding INetworkMessgeILPP assembly processing to Unity.Netcode.Components.
2024-01-17 09:55:58 +00:00
Noel Stephens 64ed674c64
fix: handle null or empty named message registration [MTT-7771] (#2807)
* fix

Fixes issue where registering or unregistering named message that is null or empty does not throw an exception.
Fixes issue where it was possible that NetworkTransform could try to unregister a named message before it had been assigned a value.

* update

Actually decided to make both cases log an error and raised the minimum loglevel.

* test

Adding a test to verify that trying to register or unregister a null or empty named message will not throw an exception.

* style

removing whitespace

* update

Adding change log entries
2024-01-13 01:58:30 +00:00