You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix
Pre-calculate the required parameter write size needed as opposed to using the legacy constant value.
* fix
Decided this all could be handled during the Awake method with no need to pre-calculate during validation. Also made adjustments to have a more precise calculation for the size needed.
* update
Adding change log entry
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
12
12
13
13
### Fixed
14
14
15
+
- Fixed issue where `NetworkAnimator` would statically allocate write buffer space for `Animator` parameters that could cause a write error if the number of parameters exceeded the space allocated.
@@ -586,6 +583,14 @@ public override void OnDestroy()
586
583
587
584
protectedvirtualvoidAwake()
588
585
{
586
+
if(!m_Animator)
587
+
{
588
+
#if !UNITY_EDITOR
589
+
Debug.LogError($"{nameof(NetworkAnimator)}{name} does not have an {nameof(UnityEngine.Animator)} assigned to it. The {nameof(NetworkAnimator)} will not initialize properly.");
590
+
#endif
591
+
return;
592
+
}
593
+
589
594
intlayers=m_Animator.layerCount;
590
595
// Initializing the below arrays for everyone handles an issue
591
596
// when running in owner authoritative mode and the owner changes.
0 commit comments