fr.jeanf.scenemanagement 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,9 +8,9 @@ namespace jeanf.scenemanagement
|
|
|
8
8
|
{
|
|
9
9
|
public class LoadPersistentSubScenes : MonoBehaviour
|
|
10
10
|
{
|
|
11
|
+
[SerializeField] private bool isLoadSequential = false;
|
|
11
12
|
[Header("The order of subScenes will define their order of load")]
|
|
12
13
|
public List<SubScene> subScenes;
|
|
13
|
-
|
|
14
14
|
|
|
15
15
|
private bool _isPersistentLoadingComplete = false;
|
|
16
16
|
public delegate void PersistentLoadingCompleteDelegate(bool status);
|
|
@@ -22,9 +22,21 @@ namespace jeanf.scenemanagement
|
|
|
22
22
|
await UniTask.Delay(100);
|
|
23
23
|
var world = World.DefaultGameObjectInjectionWorld.Unmanaged;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
if (isLoadSequential)
|
|
26
|
+
{
|
|
27
|
+
foreach (var s in subScenes)
|
|
28
|
+
{
|
|
29
|
+
await LoadSubScene(s, world);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else
|
|
26
33
|
{
|
|
27
|
-
|
|
34
|
+
var loadTasks = new List<UniTask>();
|
|
35
|
+
foreach (var s in subScenes)
|
|
36
|
+
{
|
|
37
|
+
loadTasks.Add(LoadSubScene(s, world));
|
|
38
|
+
}
|
|
39
|
+
await UniTask.WhenAll(loadTasks);
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
LoadingInformation.LoadingStatus?.Invoke($"All subScenes loaded successfully.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fr.jeanf.scenemanagement",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"displayName": "Scene Management",
|
|
5
5
|
"description": "This package contains two scene loading system, one is additive, the other is to load subscenes. \nBoth system are living side-by-side.\nThe dynamic systems handles the loading of all static content (environment) using subscenes.\nThe additive system loads scene additively depending on zone & region and upon scenario load/unload requests. Each region or scenario can have dependency that will remain loaded until either a region or a scenario became irrelevant.",
|
|
6
6
|
"unity": "2021.3",
|