-
Notifications
You must be signed in to change notification settings - Fork 450
fix: Resolving Sync Issues and adding ResetTrigger support #1327
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
Conversation
@@ -308,39 +310,27 @@ private unsafe bool WriteParameters(FastBufferWriter writer, bool autoSend) | |||
var valueInt = m_Animator.GetInteger(hash); | |||
fixed (void* value = cacheValue.Value) | |||
{ | |||
var oldValue = UnsafeUtility.AsRef<int>(value); | |||
if (valueInt != oldValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess because we can't trust the value hasn't changed because of the reset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I will revisit this for 1.1.0... I have potential solution but its a little more involved so this unblocks the issue where we get an overflow exception on the read side of things. Luckily by default we don't auto sync anything so in most cases we don't send a bunch of updates unless the user opts in for that, and we will always send a full update when we sync state which should be true but I would like to come back to this for 1.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg, can I suggest pasting what you just said in a comment around it?
Done! |
* fix: Adding the ability to call ResetTrigger for a NetworkAnimator. * chore: fix out of sync values when no value changes where happening.
…hnologies#1327) * fix: Adding the ability to call ResetTrigger for a NetworkAnimator. * chore: fix out of sync values when no value changes where happening.
…hnologies#1327) (Unity-Technologies#1344) * fix: Adding the ability to call ResetTrigger for a NetworkAnimator. * chore: fix out of sync values when no value changes where happening.
This PR allows user to properly Reset a trigger, this also fixes an issue with an overflow read issue where values were not syncing when the value didn't change with full state changes.
PR Checklist
type:backport-release-*
label. After you backport the PR, the label changes tostat:backported-release-*
.CHANGELOG.md
file.Changelog
com.unity.netcode.gameobjects
ResetTrigger
function to NetworkAnimatorTesting and Documentation