Skip to content

Commit 56a2f20

Browse files
fix: NetworkAnimator logging error when a state has no destination information (Unity-Technologies#3384)
This PR remove the error log when a state has no transition information associated with it. [MTTB-1153](https://jira.unity3d.com/browse/MTTB-1153) ## Changelog - Fixed: Issue where `NetworkAnimator` would log an error if there was no destination transition information. ## Testing and Documentation - No tests have been added. - No documentation changes or additions were necessary. <!-- Uncomment and mark items off with a * if this PR deprecates any API: ### Deprecated API - [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter yyyy-mm-dd)` entry. - [ ] An [api updater] was added. - [ ] Deprecation of the API is explained in the CHANGELOG. - [ ] The users can understand why this API was removed and what they should use instead. -->
1 parent 9728a78 commit 56a2f20

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
1616

1717
### Fixed
1818

19+
- Fixed issue where `NetworkAnimator` would log an error if there was no destination transition information. (#3384)
1920
- Fixed initial `NetworkTransform` spawn, ensure it uses world space. (#3361)
2021
- Fixed issue where `AnticipatedNetworkVariable` previous value returned by `AnticipatedNetworkVariable.OnAuthoritativeValueChanged` is updated correctly on the non-authoritative side. (#3322)
2122

com.unity.netcode.gameobjects/Components/NetworkAnimator.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,10 +1226,11 @@ internal void UpdateAnimationState(AnimationState animationState)
12261226
NetworkLog.LogError($"[DestinationState To Transition Info] Layer ({animationState.Layer}) sub-table does not contain destination state ({animationState.DestinationStateHash})!");
12271227
}
12281228
}
1229-
else if (NetworkManager.LogLevel == LogLevel.Developer)
1230-
{
1231-
NetworkLog.LogError($"[DestinationState To Transition Info] Layer ({animationState.Layer}) does not exist!");
1232-
}
1229+
// For reference, it is valid to have no transition information
1230+
//else if (NetworkManager.LogLevel == LogLevel.Developer)
1231+
//{
1232+
// NetworkLog.LogError($"[DestinationState To Transition Info] Layer ({animationState.Layer}) does not exist!");
1233+
//}
12331234
}
12341235
else if (animationState.Transition && animationState.CrossFade)
12351236
{

0 commit comments

Comments
 (0)