@@ -46,7 +46,6 @@ internal SceneNetworkSystem( Internal.TypeLibrary typeLibrary, NetworkSystem sys
4646 AddHandler < SceneRpcMsg > ( OnSceneRpc ) ;
4747 AddHandler < StaticRpcMsg > ( OnStaticRpc ) ;
4848 AddHandler < LoadSceneBeginMsg > ( OnLoadSceneMsg ) ;
49- AddHandler < LoadSceneNotifyMsg > ( OnLoadSceneNotifyMsg ) ;
5049 AddHandler < LoadSceneSnapshotMsg > ( OnLoadSceneSnapshotMsg ) ;
5150 AddHandler < LoadSceneRequestSnapshotMsg > ( OnLoadSceneRequestSnapshotMsg ) ;
5251 AddHandler < SceneLoadedMsg > ( OnSceneLoadedMsg ) ;
@@ -85,35 +84,6 @@ internal static IDisposable SuppressDestroyMessages()
8584
8685 private readonly Dictionary < Guid , Guid > PendingSceneLoads = new ( ) ;
8786
88- /// <summary>
89- /// Notify all connected clients that the host is loading a new scene.
90- /// Sent before <see cref="LoadSceneBroadcast"/> so clients can show a loading screen immediately rather than freezing with no feedback.
91- /// </summary>
92- internal void NotifySceneChangeStarting ( SceneLoadOptions options )
93- {
94- if ( ! Networking . IsActive || ! Networking . IsHost )
95- return ;
96-
97- var msg = new LoadSceneNotifyMsg { ShowLoadingScreen = options . ShowLoadingScreen } ;
98-
99- var bs = ByteStream . Create ( 64 ) ;
100- bs . Write ( InternalMessageType . Packed ) ;
101- Networking . System . Serialize ( msg , ref bs ) ;
102-
103- foreach ( var c in Connection . All )
104- {
105- if ( c == Connection . Local )
106- continue ;
107-
108- if ( c . State < Connection . ChannelState . Snapshot )
109- continue ;
110-
111- c . SendStream ( bs ) ;
112- }
113-
114- bs . Dispose ( ) ;
115- }
116-
11787 /// <summary>
11888 /// Load a scene for all other clients. This can only be called by the host.
11989 /// </summary>
@@ -332,27 +302,14 @@ private async Task OnLoadSceneRequestSnapshotMsg( LoadSceneRequestSnapshotMsg ms
332302 bs . Dispose ( ) ;
333303 }
334304
335- /// <summary>
336- /// Called when the host notifies us it is about to begin loading a new scene.
337- /// </summary>
338- private void OnLoadSceneNotifyMsg ( LoadSceneNotifyMsg msg , Connection connection , Guid msgId )
339- {
340- if ( Game . IsEditor )
341- return ;
342-
343- if ( msg . ShowLoadingScreen )
344- {
345- LoadingScreen . IsVisible = true ;
346- LoadingScreen . Title = "Loading Scene" ;
347- }
348- }
349-
350305 /// <summary>
351306 /// Called when the host has told us to load a new scene.
352307 /// </summary>
353308 private async Task OnLoadSceneMsg ( LoadSceneBeginMsg msg , Connection connection , Guid msgId )
354309 {
355- if ( ! Game . IsEditor && msg . ShowLoadingScreen )
310+ // Always show the loading screen on clients when the host changes scene,
311+ // so they see feedback immediately instead of a frozen frame.
312+ if ( ! Game . IsEditor )
356313 {
357314 LoadingScreen . IsVisible = true ;
358315 LoadingScreen . Title = "Loading Scene" ;
@@ -1420,12 +1377,6 @@ struct ObjectRefreshMsg
14201377 public Guid Guid { get ; set ; }
14211378}
14221379
1423- [ Expose ]
1424- struct LoadSceneNotifyMsg
1425- {
1426- public bool ShowLoadingScreen { get ; set ; }
1427- }
1428-
14291380[ Expose ]
14301381struct LoadSceneBeginMsg
14311382{
0 commit comments