Skip to content

Commit 3635a33

Browse files
comments inside lobbyplayerstate, index added, changelog revision
1 parent f37bf79 commit 3635a33

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Assets/Scripts/Gameplay/GameState/NetworkCharSelection.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public enum SeatState : byte
2020
/// <summary>
2121
/// Describes one of the players in the lobby, and their current character-select status.
2222
/// </summary>
23+
/// <remarks>
24+
/// Putting FixedString inside an INetworkSerializeByMemcpy struct is not recommended because it will lose the
25+
/// bandwidth optimization provided by INetworkSerializable -- an empty FixedString128Bytes serialized normally
26+
/// or through INetworkSerializable will use 4 bytes of bandwidth, but inside an INetworkSerializeByMemcpy, that
27+
/// same empty value would consume 132 bytes of bandwidth.
28+
/// </remarks>
2329
public struct LobbyPlayerState : INetworkSerializable, IEquatable<LobbyPlayerState>
2430
{
2531
public ulong ClientId;

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
1515
### Cleanup
1616
* Clarified a TODO comment inside ClientCharacter, detailing how anticipation should only be executed on owning client players (#786)
1717
* Removed now unnecessary cached NetworkBehaviour status on some components, since they now do not allocate memory (#799)
18-
* Certain structs converted to implement interface INetworkSerializeByMemcpy instead of INetworkSerializable (#822) INetworkSerializeByMemcpy optimizes for performance at the cost of bandwidth usage and flexibility, however it will only work with structs containing value types.
18+
* Certain structs converted to implement interface INetworkSerializeByMemcpy instead of INetworkSerializable (#822) INetworkSerializeByMemcpy optimizes for performance at the cost of bandwidth usage and flexibility, however it will only work with structs containing value types. For more details see the official [doc](https://docs-multiplayer.unity3d.com/netcode/current/advanced-topics/serialization/inetworkserializebymemcpy/index.html).
1919

2020
### Fixed
2121
* EnemyPortals' VFX get disabled and re-enabled once the breakable crystals are broken (#784)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Running the game over internet currently requires setting up a relay.
169169
* Client driven movements - Boss Room is server driven with anticipation animation. See [Client Driven bitesize](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.bitesize/tree/main/Basic/ClientDriven) for client driven gameplay
170170
* Player spawn - SpawnPlayer() in [Assets/Scripts/Gameplay/GameState/ServerBossRoomState.cs](Assets/Scripts/Gameplay/GameState/ServerBossRoomState.cs)
171171
* Player camera setup (with cinemachine) - OnNetworkSpawn() in [Assets/Scripts/Gameplay/GameplayObjects/Character/ClientCharacter.cs](Assets/Scripts/Gameplay/GameplayObjects/Character/ClientCharacter.cs)
172+
* INetworkSerializable (bandwidth optimization) vs INetworkSerializeByMemcpy (performance optimization) usage. See LobbyPlayerState vs ActionID structs [Assets/Scripts/Gameplay/GameState/NetworkCharSelection.cs] vs [Assets/Scripts/Gameplay/Action/ActionID.cs]
172173

173174
### Game Flow
174175
* Application Controller - [Assets/Scripts/ApplicationLifecycle/ApplicationController.cs ](Assets/Scripts/ApplicationLifecycle/ApplicationController.cs)

0 commit comments

Comments
 (0)