-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: up-port of network variable traits, anticipation, serialized null references, and removal of animator component requirement #2957
Merged
NoelStephensUnity
merged 9 commits into
release/2.0.0-pre.2
from
feat/up-port-NetworkVariable_Traits_And_Anticipation
Jun 21, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoelStephensUnity
requested review from
chrispope,
miniwolf and
a team
as code owners
June 20, 2024 19:54
fluong6
approved these changes
Jun 20, 2024
NoelStephensUnity
changed the title
feat: up-port of network variable traits and anticipation
feat: up-port of network variable traits, anticipation, serialized null references, and removal of animator component requirement
Jun 20, 2024
chrispope
approved these changes
Jun 21, 2024
NoelStephensUnity
deleted the
feat/up-port-NetworkVariable_Traits_And_Anticipation
branch
June 21, 2024 09:21
NoelStephensUnity
added a commit
that referenced
this pull request
Jun 26, 2024
* chore: updating changelog and package.json (#2952) * updating changelog and package.json * adding date * fix: rotation not being 1.0 issue using rigid body for motion (#2954) * 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. * feat: up-port of network variable traits, anticipation, serialized null references, and removal of animator component requirement (#2957) * 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 --------- Co-authored-by: Frank Luong <[email protected]>
NoelStephensUnity
added a commit
that referenced
this pull request
Jun 26, 2024
* chore: updating changelog and package.json (#2952) * updating changelog and package.json * adding date * fix: rotation not being 1.0 issue using rigid body for motion (#2954) * 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. * feat: up-port of network variable traits, anticipation, serialized null references, and removal of animator component requirement (#2957) * 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 Even if the service specifies to synchronize, if scene management is disabled then do not synchronize. * fix Removing some of the logic to determine if session owner should synchronize a connecting client or not. * fix Fixing issue with spawning objects within OnInSceneObjectsSpawned and OnNetworkSessionSynchronized primarily on the session owner side. * update Reducing the notification down to just synchronization since in-scene notification is called on the spawn sweep. * test Adding test for preventing spawning prior to being approved. Adding tests for when spawning during NetworkBehaviour.OnInSceneObjectsSpawned or NetworkBehaviour.OnNetworkSessionSynchronized or both. * fix Up port of #2953 * update Adding change log entries. * style removing white space * update reducing GC overhead during deferred despawn * style Removing whitespaces * revert Reverting deferred spawn update. --------- Co-authored-by: Frank Luong <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates NGO v2.0.0 with:
Animator
requirements for NetworkAnimator.NetworkBehaviourReference
andNetworkObjectReference
.NetworkVariable
andNetworkTransform
.Changelog
AnticipatedNetworkVariable<T>
, which adds support for client anticipation ofNetworkVariable
values, allowing for more responsive gameplay.AnticipatedNetworkTransform
, which adds support for client anticipation of NetworkTransforms.NetworkVariableBase.ExceedsDirtinessThreshold
to allow network variables to throttle updates by only sending updates when the difference between the current and previous values exceeds a threshold. (This is exposed inNetworkVariable<T>
with the callbackNetworkVariable<T>.CheckExceedsDirtinessThreshold
).NetworkVariableUpdateTraits
, which add additional throttling support:MinSecondsBetweenUpdates
will prevent theNetworkVariable
from sending updates more often than the specified time period (even if it exceeds the dirtiness threshold), whileMaxSecondsBetweenUpdates
will force a dirtyNetworkVariable
to send an update after the specified time period even if it has not yet exceeded the dirtiness threshold.NetworkVariableBase.OnInitialize
which can be used byNetworkVariable
subclasses to add initialization code.NetworkTime.TickWithPartial
, which represents the current tick as a double that includes the fractional/partial tick value.NetworkTickSystem.AnticipationTick
, which can be helpful with implementation of client anticipation. This value represents the tick the current local client was at at the beginning of the most recent network round trip, which enables it to correlate server update ticks with the client tick that may have triggered them.NetworkAnimator
no longer requires theAnimator
component to exist on the sameGameObject
.NetworkObjectReference
andNetworkBehaviourReference
to allow null references when constructing and serializing.Testing and Documentation