@@ -287,25 +287,6 @@ await MessageBox.Show("Notice",
287287 updateStatusText . text = "Decrypting resources..." ;
288288 await SetUpDynamicSecret ( ) ;
289289
290- // Enter hot update scene
291- updateStatusText . text = "Loading scene..." ;
292- var sceneLoadCallbacks = new SceneLoadCallbacks
293- {
294- OnStatusUpdate = status => updateStatusText . text = GetSceneLoadStatusText ( status ) ,
295- OnProgressUpdate = progress =>
296- {
297- downloadProgressText . text = $ "{ Mathf . RoundToInt ( progress * 100 ) } %";
298- downloadProgressBar . value = progress ;
299- } ,
300- OnError = async exception =>
301- {
302- await MessageBox . Show ( "Error" , $ "Scene loading failed: { exception . Message } ",
303- ok : "Retry" ) ;
304- }
305- } ;
306- downloadProgressBar . gameObject . SetActive ( true ) ;
307- await LoadHotUpdateScene ( package , selectedHotScene , sceneLoadCallbacks ) ;
308-
309290 // Load hot update DLL
310291 updateStatusText . text = "Loading code..." ;
311292#if UNITY_EDITOR
@@ -319,7 +300,7 @@ await MessageBox.Show("Error", $"Scene loading failed: {exception.Message}",
319300 break ;
320301 }
321302 }
322-
303+
323304 if ( hotUpdateAss == null )
324305 {
325306 throw new Exception ( $ "Hot update assembly { hotCodeName } not found in editor mode.") ;
@@ -334,6 +315,24 @@ await MessageBox.Show("Error", $"Scene loading failed: {exception.Message}",
334315 Assembly hotUpdateAss = Assembly . Load ( hotUpdateDllBytes ) ;
335316#endif
336317
318+ // Enter hot update scene
319+ updateStatusText . text = "Loading scene..." ;
320+ var sceneLoadCallbacks = new SceneLoadCallbacks
321+ {
322+ OnStatusUpdate = status => updateStatusText . text = GetSceneLoadStatusText ( status ) ,
323+ OnProgressUpdate = progress =>
324+ {
325+ downloadProgressText . text = $ "{ Mathf . RoundToInt ( progress * 100 ) } %";
326+ downloadProgressBar . value = progress ;
327+ } ,
328+ OnError = async exception =>
329+ {
330+ await MessageBox . Show ( "Error" , $ "Scene loading failed: { exception . Message } ",
331+ ok : "Retry" ) ;
332+ }
333+ } ;
334+ downloadProgressBar . gameObject . SetActive ( true ) ;
335+ await LoadHotUpdateScene ( package , selectedHotScene , sceneLoadCallbacks ) ;
337336 await LoadHotCode ( hotUpdateAss ) ;
338337
339338 // If we reach here, initialization was successful, break out of the retry loop
@@ -484,6 +483,20 @@ private async UniTask<bool> UpdatePackageImpl(ResourcePackage package,
484483#endif
485484 break ;
486485 }
486+ case TargetPlatform . Standalone :
487+ {
488+ var fileSystemParams = FileSystemParameters . CreateDefaultBuildinFileSystemParameters (
489+ bundleConfig . Decryption ) ;
490+ fileSystemParams . AddParameter ( FileSystemParametersDefine . MANIFEST_SERVICES ,
491+ manifestRestoration ) ;
492+
493+ initParameters = new OfflinePlayModeParameters
494+ {
495+ BuildinFileSystemParameters = fileSystemParams
496+ } ;
497+
498+ break ;
499+ }
487500 case TargetPlatform . WeChat :
488501 {
489502 YooAssets . SetOperationSystemMaxTimeSlice ( 100 ) ;
0 commit comments