Skip to content

Commit a65b4d7

Browse files
authored
Merge branch 'develop' into fix_localTime_sync
2 parents 9cf3fe4 + 25ec4a5 commit a65b4d7

30 files changed

+709
-116
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Metrics/ @Unity-Technologies/multiplayer-tools
77
/com.unity.netcode.gameobjects/Runtime/Transports/ @Unity-Technologies/multiplayer-workflows
88
/com.unity.netcode.gameobjects/Tests/Editor/Transports/ @Unity-Technologies/multiplayer-workflows
99
/com.unity.netcode.gameobjects/Tests/Runtime/Transports/ @Unity-Technologies/multiplayer-workflows
10-
*.asmdef @chrispope @miniwolf
11-
package.json @chrispope @miniwolf
12-
AssemblyInfo.cs @chrispope @miniwolf
13-
.editorconfig @chrispope @miniwolf
14-
.gitignore @chrispope @miniwolf
15-
.github/ @chrispope @miniwolf
16-
.yamato/ @chrispope @miniwolf
10+
*.asmdef @chrispope @miniwolf @NoelStephensUnity @fluong6
11+
package.json @chrispope @miniwolf @NoelStephensUnity @fluong6
12+
AssemblyInfo.cs @chrispope @miniwolf @NoelStephensUnity @fluong6
13+
.editorconfig @chrispope @miniwolf @NoelStephensUnity @fluong6
14+
.gitignore @chrispope @miniwolf @NoelStephensUnity @fluong6
15+
.github/ @chrispope @miniwolf @NoelStephensUnity @fluong6
16+
.yamato/ @chrispope @miniwolf @NoelStephensUnity @fluong6

.yamato/code-coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ code_coverage_win_{{ project.name }}_{{ validation_editor }}:
99
image: package-ci/win10:v4
1010
flavor: b1.large
1111
commands:
12-
- pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
12+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
13+
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
14+
- pip install unity-downloader-cli --upgrade
1315
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1416
- unity-downloader-cli -u {{ validation_editor }} -c editor --wait --fast
1517
- upm-ci package test -u .Editor --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime,+Unity.Netcode.Components'

.yamato/mobile-build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ build_{{ project.name }}_tests_{{ editor }}_android:
1111
image: desktop/android-execution-r19:v0.1.1-860408
1212
flavor: b1.xlarge
1313
commands:
14+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1415
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16+
- pip install unity-downloader-cli --upgrade
1517
- curl -s https://artifactory-slo.bf.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
1618
- python .yamato/disable-burst-if-requested.py --project-path testproject --platform Android
1719
- unity-downloader-cli -u {{ editor }} -c editor -c Android -w --fast
@@ -49,7 +51,9 @@ build_{{ project.name }}_tests_{{ editor }}_iOS:
4951
image: mobile/ios-macos-11:stable
5052
flavor: b1.large
5153
commands:
54+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
5255
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
56+
- pip install unity-downloader-cli --upgrade
5357
- unity-downloader-cli -u {{ editor }} -c editor -c iOS -w --fast
5458
- curl -s https://artifactory-slo.bf.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
5559
- chmod +x ./utr

.yamato/multiprocess-project-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}:
1212
image: {{ platform.image }}
1313
flavor: {{ platform.flavor}}
1414
commands:
15+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1516
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
17+
- pip install unity-downloader-cli --upgrade
1618
{% if editor != "trunk" %}
1719
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
1820
- curl -s https://artifactory-slo.bf.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr{% if platform.name == "win" %}.bat --output utr.bat{% endif %}{% if platform.name != "win" %} --output utr && chmod +x ./utr{% endif %}

.yamato/project-standards.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ standards_{{ projects.first.name }}:
99
commands:
1010
- dotnet --version
1111
- dotnet format --version
12-
- pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
12+
- sudo add-apt-repository -y ppa:deadsnakes/ppa
13+
- sudo apt update
14+
- sudo apt install -y python3.9
15+
- pip3 config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16+
- pip3 install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
17+
- pip3 install unity-downloader-cli --upgrade
1318
- unity-downloader-cli -u {{ projects.first.test_editors.first }} -c editor --wait --fast
1419
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ projects.first.path }} -quit
1520
- dotnet run --project dotnet-tools/netcode.standards -- --project={{ projects.first.path }} --check

.yamato/project-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
1515
flavor: {{ platform.flavor}}
1616
commands:
1717
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
18+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1819
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
20+
- pip install unity-downloader-cli --upgrade
1921
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
2022
- {% if platform.name == "ubuntu" %}DISPLAY=:0 && {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
2123
artifacts:

.yamato/standalone-project-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ standalone_tests_{{ project.name }}_{{ backend }}_{{ editor }}_{{ platform.name
1515
flavor: {{ platform.flavor}}
1616
commands:
1717
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
18+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1819
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
20+
- pip install unity-downloader-cli --upgrade
1921
- curl -s https://artifactory-slo.bf.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr{% if platform.name == "win" %}.bat{% endif %} --output utr{% if platform.name == "win" %}.bat{% endif %}
2022
{% if platform.name != "win" %}
2123
- chmod +x ./utr

.yamato/webgl-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ build_{{ project.name }}_tests_{{ editor }}_webgl:
1111
image: dots-ci/windows10:v1.493-auto
1212
flavor: b1.xlarge
1313
commands:
14+
- pip config set global.index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1415
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16+
- pip install unity-downloader-cli --upgrade
1517
- curl -s https://artifactory-slo.bf.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
1618
- python .yamato/disable-burst-if-requested.py --project-path testproject --platform WebGL
1719
- unity-downloader-cli -u {{ editor }} -c editor -c webgl -c il2cpp -w --fast

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ Additional documentation and release notes are available at [Multiplayer Documen
1010

1111
### Added
1212

13+
- Added a static `NetworkManager.OnInstantiated` event notification to be able to track when a new `NetworkManager` instance has been instantiated. (#3089)
14+
- Added a static `NetworkManager.OnDestroying` event notification to be able to track when an existing `NetworkManager` instance is being destroyed. (#3089)
15+
- Added message size validation to named and unnamed message sending functions for better error messages. (#3043)
16+
- Added "Check for NetworkObject Component" property to the Multiplayer->Netcode for GameObjects project settings. When disabled, this will bypass the in-editor `NetworkObject` check on `NetworkBehaviour` components. (#3034)
17+
1318
### Fixed
1419

20+
- Fixed issue with the in-scene network prefab instance update menu tool where it was not properly updating scenes when invoked on the root prefab instance. (#3084)
21+
- Fixed issue where `NetworkAnimator` would send updates to non-observer clients. (#3058)
22+
- Fixed issue where an exception could occur when receiving a universal RPC for a `NetworkObject` that has been despawned. (#3055)
23+
- Fixed issue where setting a prefab hash value during connection approval but not having a player prefab assigned could cause an exception when spawning a player. (#3046)
1524
- Fixed issue where collections v2.2.x was not supported when using UTP v2.2.x within Unity v2022.3. (#3033)
1625
- Fixed issue where the `NetworkSpawnManager.HandleNetworkObjectShow` could throw an exception if one of the `NetworkObject` components to show was destroyed during the same frame. (#3029)
1726
- Fixed issue where the `NetworkManagerHelper` was continuing to check for hierarchy changes when in play mode. (#3027)

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

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,14 @@ internal void CheckForAnimatorChanges()
924924
{
925925
// Just notify all remote clients and not the local server
926926
m_ClientSendList.Clear();
927-
m_ClientSendList.AddRange(NetworkManager.ConnectedClientsIds);
928-
m_ClientSendList.Remove(NetworkManager.LocalClientId);
927+
foreach (var clientId in NetworkManager.ConnectedClientsIds)
928+
{
929+
if (clientId == NetworkManager.LocalClientId || !NetworkObject.Observers.Contains(clientId))
930+
{
931+
continue;
932+
}
933+
m_ClientSendList.Add(clientId);
934+
}
929935
m_ClientRpcParams.Send.TargetClientIds = m_ClientSendList;
930936
SendAnimStateClientRpc(m_AnimationMessage, m_ClientRpcParams);
931937
}
@@ -1223,9 +1229,14 @@ private unsafe void SendParametersUpdateServerRpc(ParametersUpdateMessage parame
12231229
if (NetworkManager.ConnectedClientsIds.Count > (IsHost ? 2 : 1))
12241230
{
12251231
m_ClientSendList.Clear();
1226-
m_ClientSendList.AddRange(NetworkManager.ConnectedClientsIds);
1227-
m_ClientSendList.Remove(serverRpcParams.Receive.SenderClientId);
1228-
m_ClientSendList.Remove(NetworkManager.ServerClientId);
1232+
foreach (var clientId in NetworkManager.ConnectedClientsIds)
1233+
{
1234+
if (clientId == serverRpcParams.Receive.SenderClientId || clientId == NetworkManager.ServerClientId || !NetworkObject.Observers.Contains(clientId))
1235+
{
1236+
continue;
1237+
}
1238+
m_ClientSendList.Add(clientId);
1239+
}
12291240
m_ClientRpcParams.Send.TargetClientIds = m_ClientSendList;
12301241
m_NetworkAnimatorStateChangeHandler.SendParameterUpdate(parametersUpdate, m_ClientRpcParams);
12311242
}
@@ -1271,9 +1282,14 @@ private unsafe void SendAnimStateServerRpc(AnimationMessage animationMessage, Se
12711282
if (NetworkManager.ConnectedClientsIds.Count > (IsHost ? 2 : 1))
12721283
{
12731284
m_ClientSendList.Clear();
1274-
m_ClientSendList.AddRange(NetworkManager.ConnectedClientsIds);
1275-
m_ClientSendList.Remove(serverRpcParams.Receive.SenderClientId);
1276-
m_ClientSendList.Remove(NetworkManager.ServerClientId);
1285+
foreach (var clientId in NetworkManager.ConnectedClientsIds)
1286+
{
1287+
if (clientId == serverRpcParams.Receive.SenderClientId || clientId == NetworkManager.ServerClientId || !NetworkObject.Observers.Contains(clientId))
1288+
{
1289+
continue;
1290+
}
1291+
m_ClientSendList.Add(clientId);
1292+
}
12771293
m_ClientRpcParams.Send.TargetClientIds = m_ClientSendList;
12781294
m_NetworkAnimatorStateChangeHandler.SendAnimationUpdate(animationMessage, m_ClientRpcParams);
12791295
}
@@ -1322,8 +1338,14 @@ internal void SendAnimTriggerServerRpc(AnimationTriggerMessage animationTriggerM
13221338
InternalSetTrigger(animationTriggerMessage.Hash, animationTriggerMessage.IsTriggerSet);
13231339

13241340
m_ClientSendList.Clear();
1325-
m_ClientSendList.AddRange(NetworkManager.ConnectedClientsIds);
1326-
m_ClientSendList.Remove(NetworkManager.ServerClientId);
1341+
foreach (var clientId in NetworkManager.ConnectedClientsIds)
1342+
{
1343+
if (clientId == NetworkManager.ServerClientId || !NetworkObject.Observers.Contains(clientId))
1344+
{
1345+
continue;
1346+
}
1347+
m_ClientSendList.Add(clientId);
1348+
}
13271349

13281350
if (IsServerAuthoritative())
13291351
{

0 commit comments

Comments
 (0)