Skip to content

fix: NetworkAnimator destinationStateMachine exception [MTT-5083] #2309

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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5500c6b
fix
NoelStephensUnity Nov 12, 2022
353893b
fix
NoelStephensUnity Nov 14, 2022
c9ff07c
test manual
NoelStephensUnity Nov 14, 2022
870be01
fix
NoelStephensUnity Nov 14, 2022
fb975dc
test
NoelStephensUnity Nov 14, 2022
2a49e2b
update
NoelStephensUnity Nov 14, 2022
b379dd2
update
NoelStephensUnity Nov 14, 2022
6ecf4d0
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 14, 2022
7eb8316
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 18, 2022
4b6ed27
update and fix
NoelStephensUnity Nov 19, 2022
8810b31
test
NoelStephensUnity Nov 19, 2022
07f8942
fix
NoelStephensUnity Nov 20, 2022
4e36786
test
NoelStephensUnity Nov 20, 2022
4314dd6
fix
NoelStephensUnity Nov 20, 2022
7f5d45b
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 20, 2022
19bf656
update
NoelStephensUnity Nov 21, 2022
ddd03f0
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 21, 2022
442ea04
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 23, 2022
6bafef4
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Nov 28, 2022
5ce321c
fix
NoelStephensUnity Nov 28, 2022
6a976d5
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Dec 12, 2022
06472f8
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Dec 21, 2022
d71655a
Merge develop into fix/networkanimator-destinationstatemachine-exception
netcode-ci-service Jan 6, 2023
2e9f8d9
Merge develop into fix/networkanimator-destinationstatemachine-exception
netcode-ci-service Jan 6, 2023
3d764ec
update
NoelStephensUnity Jan 10, 2023
46bf588
update
NoelStephensUnity Jan 10, 2023
ba515d8
update
NoelStephensUnity Jan 10, 2023
cd110e6
Merge branch 'develop' into fix/networkanimator-destinationstatemachi…
NoelStephensUnity Jan 12, 2023
bd5b81c
update
NoelStephensUnity Jan 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ Additional documentation and release notes are available at [Multiplayer Documen
- Network prefabs are now stored in a ScriptableObject that can be shared between NetworkManagers, and have been exposed for public access. By default, a Default Prefabs List is created that contains all NetworkObject prefabs in the project, and new NetworkManagers will default to using that unless that option is turned off in the Netcode for GameObjects settings. Existing NetworkManagers will maintain their existing lists, which can be migrated to the new format via a button in their inspector. (#2322)

### Fixed
- Fixed a UTP test that was failing when you install Unity Transport package 2.0.0 or newer. (#2347)
- Fixed issue where `NetcodeSettingsProvider` would throw an exception in Unity 2020.3.x versions. (#2345)
- Fixed server side issue where, depending upon component ordering, some NetworkBehaviour components might not have their OnNetworkDespawn method invoked if the client side disconnected. (#2323)
- Fixed a case where data corruption could occur when using UnityTransport when reaching a certain level of send throughput. (#2332)
- Fixed an issue in `UnityTransport` where an exception would be thrown if starting a Relay host/server on WebGL. This exception should only be thrown if using direct connections (where WebGL can't act as a host/server). (#2321)
- Fixed a UTP test that was failing when you install Unity Transport package 2.0.0 or newer. (#2347)
- Fixed `NetworkAnimator` issue where it was not checking for `AnimatorStateTtansition.destinationStateMachine` and any possible sub-states defined within it. (#2309)
- Fixed `NetworkAnimator` issue where the host client was receiving the ClientRpc animation updates when the host was the owner.(#2309)
- Fixed `NetworkAnimator` issue with using pooled objects and when specific properties are cleaned during despawn and destroy.(#2309)
- Fixed issue where `NetworkAnimator` was checking for animation changes when the associated `NetworkObject` was not spawned.(#2309)

## [1.2.0] - 2022-11-21

Expand Down
9 changes: 7 additions & 2 deletions com.unity.netcode.gameobjects/Components/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using System.Runtime.CompilerServices;

#if UNITY_EDITOR
[assembly: InternalsVisibleTo("Unity.Netcode.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.CodeGen")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor")]
#endif

#if UNITY_INCLUDE_TESTS
#if UNITY_EDITOR
[assembly: InternalsVisibleTo("Unity.Netcode.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
#endif
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.RuntimeTests")]
#endif
444 changes: 240 additions & 204 deletions com.unity.netcode.gameobjects/Components/NetworkAnimator.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,20 @@ private void DisplayTestIntValueIfChanged()
m_TestIntValue = testIntValue;
Debug.Log($"[{name}]TestInt value changed to = {m_TestIntValue}");
}
var testFloatValue = m_Animator.GetInteger("TestFloat");
var testFloatValue = m_Animator.GetFloat("TestFloat");
if (m_TestFloatValue != testFloatValue)
{
m_TestFloatValue = testFloatValue;
Debug.Log($"[{name}]TestFloat value changed to = {m_TestIntValue}");
}
}

private void BeginAttack(int weaponType)
{
m_Animator.SetInteger("WeaponType", weaponType);
m_NetworkAnimator.SetTrigger("Attack");
}

private void LateUpdate()
{

Expand Down Expand Up @@ -212,6 +218,17 @@ private void LateUpdate()
Debug.Log($"[{name}] TestInt value = {m_TestIntValue}");
Debug.Log($"[{name}] TestInt value = {m_TestIntValue}");
}

if (Input.GetKeyDown(KeyCode.Alpha1))
{
BeginAttack(1);
}

if (Input.GetKeyDown(KeyCode.Alpha2))
{
BeginAttack(2);
}

}
}
}
Expand Down
Loading