Skip to content

Commit 83807d8

Browse files
fix monobehaviour issue
1 parent fc348df commit 83807d8

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

UnityProject/Packages/com.jasonxudeveloper.jengine.core/Runtime/Bootstrap.cs

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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

UnityProject/Packages/com.jasonxudeveloper.jengine.core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.jasonxudeveloper.jengine.core",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"displayName": "JEngine.Core",
55
"description": "The solution that allows unity games update in runtime.",
66
"license": "MIT",
@@ -23,7 +23,7 @@
2323
},
2424
"dependencies": {
2525
"com.cysharp.unitask": "2.5.10",
26-
"com.jasonxudeveloper.nino": "4.0.0-preview.135",
26+
"com.jasonxudeveloper.nino": "4.0.0-preview.137",
2727
"com.tuyoogame.yooasset": "2.3.16"
2828
}
2929
}

UnityProject/Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"com.code-philosophy.obfuz": "https://github.com/focus-creative-games/obfuz.git",
44
"com.code-philosophy.obfuz4hybridclr": "https://github.com/focus-creative-games/obfuz4hybridclr.git",
55
"com.cysharp.unitask": "2.5.10",
6-
"com.jasonxudeveloper.nino": "4.0.0-preview.135",
6+
"com.jasonxudeveloper.nino": "4.0.0-preview.137",
77
"com.tuyoogame.yooasset": "2.3.16",
88
"com.unity.2d.sprite": "1.0.0",
99
"com.unity.2d.tilemap": "1.0.0",

UnityProject/Packages/packages-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"depth": 0,
1212
"source": "git",
1313
"dependencies": {},
14-
"hash": "747ee88fd391441f9471992ffc294c36d1b35b09"
14+
"hash": "b582c1f24bda5676c54dc66529e9b1d6f9aead47"
1515
},
1616
"com.code-philosophy.obfuz4hybridclr": {
1717
"version": "https://github.com/focus-creative-games/obfuz4hybridclr.git",
@@ -33,12 +33,12 @@
3333
"source": "embedded",
3434
"dependencies": {
3535
"com.cysharp.unitask": "2.5.10",
36-
"com.jasonxudeveloper.nino": "4.0.0-preview.135",
36+
"com.jasonxudeveloper.nino": "4.0.0-preview.137",
3737
"com.tuyoogame.yooasset": "2.3.16"
3838
}
3939
},
4040
"com.jasonxudeveloper.nino": {
41-
"version": "4.0.0-preview.135",
41+
"version": "4.0.0-preview.137",
4242
"depth": 0,
4343
"source": "registry",
4444
"dependencies": {},

0 commit comments

Comments
 (0)