com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Do not require component Animator on NetworkAnimator.

Open jeffgamedev opened this issue 1 year ago • 1 comments

This PR removes the hard RequireComponent of Animator from component NetworkAnimator. The reason is that NetworkAnimator does not in fact require an Animator object to be on the game object, and functions just as well accessing a child game object's Animator.

The NetworkAnimator requires a reference to any Animator, not an Animator on the same game object. In the current implementation, this requires my Player game object to have an unused Animator attached due to the component being required.

Changelog

  • Delete [RequireComponent(typeof(Animator))] on NetworkAnimator component.

Suggestions for the future

Allow NetworkAnimator to throw 1 warning if the Animator reference is empty instead of constantly throwing errors.

jeffgamedev avatar Jan 18 '24 20:01 jeffgamedev

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


jeffgamedev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

unity-cla-assistant avatar Feb 22 '24 16:02 unity-cla-assistant

This was migrated to the public repository in #2872 and will be included in the v1.9.0 update. Thank you for your submission!

NoelStephensUnity avatar Apr 05 '24 16:04 NoelStephensUnity