diff --git a/Mirror/Runtime/NetworkIdentity.cs b/Mirror/Runtime/NetworkIdentity.cs index ec25144d..558aef1a 100644 --- a/Mirror/Runtime/NetworkIdentity.cs +++ b/Mirror/Runtime/NetworkIdentity.cs @@ -295,7 +295,7 @@ namespace Mirror // NetworkBehaviour components are initialized in Awake once. // Changing them at runtime would get client & server out of sync. // BUT internal so tests can add them after creating the NetworkIdentity - public void InitializeNetworkBehaviours() + internal void InitializeNetworkBehaviours() { // Get all NetworkBehaviours // (never null. GetComponents returns [] if none found) diff --git a/QSB/Animation/Player/AnimationSync.cs b/QSB/Animation/Player/AnimationSync.cs index a453f798..f99a432c 100644 --- a/QSB/Animation/Player/AnimationSync.cs +++ b/QSB/Animation/Player/AnimationSync.cs @@ -34,12 +34,8 @@ namespace QSB.Animation.Player protected void Awake() { - InvisibleAnimator = gameObject.AddComponent(); - gameObject.SetActive(false); - NetworkAnimator = gameObject.AddComponent(); - NetworkAnimator.animator = InvisibleAnimator; - gameObject.SetActive(true); - netIdentity.InitializeNetworkBehaviours(); + InvisibleAnimator = gameObject.GetRequiredComponent(); + NetworkAnimator = gameObject.GetRequiredComponent(); NetworkAnimator.enabled = false; QSBSceneManager.OnUniverseSceneLoaded += OnUniverseSceneLoaded; diff --git a/QSB/AssetBundles/network b/QSB/AssetBundles/network index ae4931bb..8c3cefa3 100644 Binary files a/QSB/AssetBundles/network and b/QSB/AssetBundles/network differ diff --git a/QSB/AssetBundles/network.manifest b/QSB/AssetBundles/network.manifest index 6a2e81e9..dab262f5 100644 --- a/QSB/AssetBundles/network.manifest +++ b/QSB/AssetBundles/network.manifest @@ -1,18 +1,22 @@ ManifestFileVersion: 0 -CRC: 3050150252 +CRC: 904672015 Hashes: AssetFileHash: serializedVersion: 2 - Hash: e3779728ade70a83cb691ff38a942b27 + Hash: 0b4be2b85e27e674ee1f3e4b49f62e9c TypeTreeHash: serializedVersion: 2 - Hash: 685965bc8b6c3e44c52353fb71b334e8 + Hash: 14984479d6126808e669db352f4ec761 HashAppended: 0 ClassTypes: - Class: 1 Script: {instanceID: 0} - Class: 4 Script: {instanceID: 0} +- Class: 95 + Script: {instanceID: 0} +- Class: 114 + Script: {fileID: 1077175584, guid: b782d36837e164d4e87858bf8f2736c6, type: 3} - Class: 114 Script: {fileID: 860895539, guid: b782d36837e164d4e87858bf8f2736c6, type: 3} - Class: 114 @@ -29,6 +33,8 @@ ClassTypes: Script: {fileID: 78926581, guid: 27687deae413b90448366870cb0de502, type: 3} - Class: 114 Script: {fileID: -749020886, guid: 27687deae413b90448366870cb0de502, type: 3} +- Class: 114 + Script: {fileID: -270813150, guid: 27687deae413b90448366870cb0de502, type: 3} - Class: 114 Script: {fileID: -1617191155, guid: 27687deae413b90448366870cb0de502, type: 3} - Class: 114 diff --git a/QSB/TimeSync/WakeUpSync.cs b/QSB/TimeSync/WakeUpSync.cs index 6b7d8b9c..8bb8b663 100644 --- a/QSB/TimeSync/WakeUpSync.cs +++ b/QSB/TimeSync/WakeUpSync.cs @@ -114,8 +114,7 @@ namespace QSB.TimeSync { new RequestStateResyncMessage().Send(); CurrentState = State.Loaded; - gameObject.GetAddComponent(); - netIdentity.InitializeNetworkBehaviours(); + gameObject.GetRequiredComponent(); if (isServer) { SendServerTime();