@@ -26,14 +26,14 @@ public void SendMessage<T>(T message) where T : unmanaged, IRpcCommand
2626 }
2727
2828 /// <summary>
29- /// The <see cref="NetworkManager"/> a hybrid session's world was created for , as a singleton in that world .
29+ /// This is used to track the <see cref="NetworkManager"/>, as a singleton, when running a hybrid session .
3030 /// </summary>
3131 internal struct HybridNetworkManager : IComponentData
3232 {
3333 public UnityObjectRef < NetworkManager > NetworkManager ;
3434 }
3535
36- // Created only in client and server worlds, and updated only in one a NetworkManager created for a hybrid session.
36+ // Only exists in client and server worlds, and only updates in a world created for a hybrid session.
3737 [ WorldSystemFilter ( WorldSystemFilterFlags . ServerSimulation | WorldSystemFilterFlags . ClientSimulation ) ]
3838 internal partial class UnifiedUpdateConnections : SystemBase
3939 {
@@ -53,7 +53,7 @@ protected override void OnUpdate()
5353 {
5454 var commandBuffer = new EntityCommandBuffer ( Allocator . Temp ) ;
5555 var networkManager = m_HybridNetworkManagerQuery . GetSingleton < HybridNetworkManager > ( ) . NetworkManager . Value ;
56- // The world outlives its NetworkManager if ShutdownInternal throws before disposing it .
56+ // A missing NetworkManager counts as shutting down: the world outlives it if ShutdownInternal throws before disposing the world .
5757 var isShuttingDown = ! networkManager || networkManager . ShutdownInProgress || ! networkManager . IsListening ;
5858 foreach ( var ( networkId , connectionState , entity ) in SystemAPI . Query < NetworkId , ConnectionState > ( ) . WithNone < NetworkStreamConnection > ( ) . WithEntityAccess ( ) )
5959 {
@@ -118,7 +118,7 @@ protected override void OnUpdate()
118118 // make sure we have disconnected all known connections.
119119 if ( isShuttingDown )
120120 {
121- // Only connections that went in-game have ConnectionState, which is removed here, so each is reported once.
121+ // Only in-game connections have ConnectionState, and removing it here means each one is only reported once.
122122 foreach ( var ( networkId , entity ) in SystemAPI . Query < NetworkId > ( ) . WithAll < ConnectionState > ( ) . WithEntityAccess ( ) )
123123 {
124124 commandBuffer . RemoveComponent < ConnectionState > ( entity ) ;
0 commit comments