SyncVarHookTest: reduce dependencies on CreateNetworkIdentity to prepare for removal

This commit is contained in:
vis2k 2021-05-20 13:08:12 +08:00
parent 35e1976373
commit 0af57b1bea

View File

@ -258,7 +258,9 @@ public void NetworkBehaviourHook_HookCalledWhenSyncingChangedValue(bool intialSt
CreateNetworked(out GameObject _, out NetworkIdentity _, out NetworkBehaviourHookBehaviour clientObject);
NetworkBehaviourHookBehaviour clientValue = null;
NetworkBehaviourHookBehaviour serverValue = CreateNetworkIdentity(2033).gameObject.AddComponent<NetworkBehaviourHookBehaviour>();
CreateNetworked(out GameObject _, out NetworkIdentity serverIdentity, out NetworkBehaviourHookBehaviour serverValue);
serverIdentity.netId = 2033;
NetworkIdentity.spawned[serverIdentity.netId] = serverIdentity;
serverObject.value = serverValue;
clientObject.value = clientValue;