Skip to content

Commit e48babb

Browse files
Merge pull request #872 from Unity-Technologies/release/2.4.0
release: v2.4.0
2 parents 1b5d166 + 0bd36bf commit e48babb

18 files changed

+91
-56
lines changed

Assets/Scripts/Gameplay/GameState/ServerBossRoomState.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ void SpawnPlayer(ulong clientId, bool lateJoin)
204204
}
205205
}
206206

207-
networkAvatarGuidState.AvatarGuid.Value =
208-
persistentPlayer.NetworkAvatarGuidState.AvatarGuid.Value;
207+
// instantiate new NetworkVariables with a default value to ensure they're ready for use on OnNetworkSpawn
208+
networkAvatarGuidState.AvatarGuid = new NetworkVariable<NetworkGuid>(persistentPlayer.NetworkAvatarGuidState.AvatarGuid.Value);
209209

210210
// pass name from persistent player to avatar
211211
if (newPlayer.TryGetComponent(out NetworkNameState networkNameState))
212212
{
213-
networkNameState.Name.Value = persistentPlayer.NetworkNameState.Name.Value;
213+
networkNameState.Name = new NetworkVariable<FixedPlayerName>(persistentPlayer.NetworkNameState.Name.Value);
214214
}
215215

216216
// spawn players characters with destroyWithScene = true

Assets/Scripts/Infrastructure/PubSub/NetworkedMessageChannel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ public override void Publish(T message)
7575

7676
void SendMessageThroughNetwork(T message)
7777
{
78+
// Avoid throwing an exception if you are in the middle of shutting down and either
79+
// NetworkManager no longer exists or the CustomMessagingManager no longer exists.
80+
if (m_NetworkManager == null || m_NetworkManager.CustomMessagingManager == null)
81+
{
82+
return;
83+
}
7884
var writer = new FastBufferWriter(FastBufferWriter.GetWriteSize<T>(), Allocator.Temp);
7985
writer.WriteValueSafe(message);
8086
m_NetworkManager.CustomMessagingManager.SendNamedMessageToAll(m_Name, writer);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:b276240933fdda078fe3a462a4729dbade38d49a9ae51cc6eaad477907cb2ac9
3-
size 3493
2+
oid sha256:156f546b1b47dd12ebf17462717d52e8b9225b90057649a6f994d1b9a05df6d3
3+
size 3673
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:08ba74e6bb58af1ca915ad7e9f6bdcc451d2604be3bf6a8621a9a91f83ac747c
3-
size 3501
2+
oid sha256:664825d50ebaca88798a13d93675e3c4c5bb7d155e963ee13cf2bc79f5f8d86f
3+
size 3681
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:b3fa683710f40f40512976e3bdae2171c9ba488c985f87995fd0577839347cd6
3-
size 3493
2+
oid sha256:6031aaba9d7ac0ca61ea9f6cc34c9133e0b65e4be56559ca2641975bfb980f54
3+
size 3673
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:d20bce9da6b76d3fb037333159f05170ad0e75d5f4df6414bcca8c368585f501
3-
size 3495
2+
oid sha256:e410deed7cd331c908f7de7defdf7a2994eb002e3384c8ad69357c033d25b665
3+
size 3675

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

77
Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).
88

9+
## [2.4.0] - 2023-12-13
10+
11+
### Changed
12+
* Upgraded editor version to 2022.3.14f1 (#871)
13+
* com.unity.ai.navigation upgraded to v1.1.5
14+
* com.unity.render-pipelines.universal upgraded to v14.0.9
15+
* com.unity.services.authentication upgraded to v2.7.1
16+
* Upgraded Boss Room to Netcode for GameObjects v1.7.1 (#871)
17+
18+
### Fixed
19+
* Fixed NetworkVariable warnings that would be logged when a player was spawned (#863) For a player, certain NetworkVariable values were previously modified before the player's NetworkObject was spawned, resulting in warnings. Now, the NetworkVariable itself is instantiated on the server pre-spawn, such that it is instantiated with the new default value, ensuring the new default value is ready to be read on subsequent OnNetworkSpawn methods for said NetworkObject.
20+
921
## [2.3.0] - 2023-09-07
1022

1123
### Changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

Packages/com.unity.multiplayer.samples.coop/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Multiplayer Samples Co-op Changelog
22

3+
## [1.8.0] - 2023-12-13
4+
5+
### Changed
6+
* Upgraded Utilities package to Netcode for GameObjects v1.7.1 (#871)
7+
38
## [1.7.0] - 2023-09-07
49

510
### Changed

0 commit comments

Comments
 (0)