Skip to content

fix: remove auto-send animation parameters #1746

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

Merged
merged 4 commits into from
Feb 24, 2022

Conversation

mattwalsh-unity
Copy link
Contributor

@mattwalsh-unity mattwalsh-unity commented Feb 23, 2022

This autoSend parameter feature was a bit of a mystery. After doing some digging this turns out to be something inspired by HLAPI. The best I and folks like @larus can tell, this "force parameter sync unconditionally" option might help were we to be transmitting this in an unreliable fashion, which we aren't (and even if we were, we'd use some other mechanism).

All things considered I can't find a good reason for this feature to live on / update. It has confused users who understandably but wrongly conclude the NetworkAnimator checkboxes mean "if you want this parameter, sync this"

Even more info is found in MTT-2530

  • No tests have been added.
  • No documentation is needed, because we didn't document this feature before

@mattwalsh-unity mattwalsh-unity force-pushed the fix/remove-animation-autosend branch from 3538bd7 to 01f0be5 Compare February 23, 2022 21:56
* get replicated on a regular basis regardless of a state change. The thinking
* behind this is that many of the parameters people use are usually booleans
* which result in a state change and thus would cause a full sync of state.
* Thus if you really care about a parameter syncing then you need to be explicit
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I can't ask Andrew what he meant by "if you really care", but apart from adding redundancy to cover unreliable delivery (which we don't use for this), the only scenario I can think of here is if you could go from state A to state B and back to state A all between 2 sequential FixedUpdate calls (and also not using our SetTrigger), in which case we wouldn't pick it up and the connected players would stay on 'A' missing the ultra-short 'B' transition.

{
if (m_CachedAnimatorParameters == null)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can never be null

public override void OnInspectorGUI()
{
Init();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem worth it to me to go to the trouble of tracking init and not re-drawing. This isn't remotely performance noticeable, and makes the code harder to grok.

@mattwalsh-unity mattwalsh-unity merged commit 162989f into develop Feb 24, 2022
@mattwalsh-unity mattwalsh-unity deleted the fix/remove-animation-autosend branch February 24, 2022 01:00
mattwalsh-unity added a commit that referenced this pull request Feb 25, 2022
…mation tests (#1746) (#1751)

* fix: remove auto-send animation parameters (#1746)
* comment updates
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.

2 participants