fr.jeanf.scenemanagement 0.4.2 → 0.4.4
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.
|
@@ -30,7 +30,8 @@ namespace jeanf.scenemanagement
|
|
|
30
30
|
public static ManageScenarioDelegate EndScenarioRequest;
|
|
31
31
|
public static ManageScenarioDelegate StartScenarioRequest;
|
|
32
32
|
public static ManageScenarioDelegate RestartScenarioRequest;
|
|
33
|
-
|
|
33
|
+
public delegate void OnUnloadScenario();
|
|
34
|
+
public static OnUnloadScenario onUnloadScenario;
|
|
34
35
|
public delegate void UpdateScenariosDelegate(List<string> activeScenarios);
|
|
35
36
|
public static UpdateScenariosDelegate UpdateScenariosList;
|
|
36
37
|
|
|
@@ -129,6 +130,8 @@ namespace jeanf.scenemanagement
|
|
|
129
130
|
_activeScenarios.Remove(UnloadScenario(scenarioID));
|
|
130
131
|
List<string> scenarioList = _activeScenarios.Select(scenario => scenario.id.ToString()).ToList();
|
|
131
132
|
UpdateScenariosList?.Invoke(scenarioList);
|
|
133
|
+
onUnloadScenario.Invoke();
|
|
134
|
+
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
private Scenario UnloadScenario(string scenarioID)
|
|
@@ -45,7 +45,7 @@ namespace jeanf.scenemanagement
|
|
|
45
45
|
|
|
46
46
|
private async UniTask LoadSubScene(SubScene subScene, WorldUnmanaged world)
|
|
47
47
|
{
|
|
48
|
-
LoadingInformation.LoadingStatus?.Invoke($"Loading subScene: {subScene.
|
|
48
|
+
LoadingInformation.LoadingStatus?.Invoke($"Loading subScene: {subScene.name }.");
|
|
49
49
|
var guid = subScene.SceneGUID;
|
|
50
50
|
var subSceneEntity = SceneSystem.LoadSceneAsync(world, guid);
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ namespace jeanf.scenemanagement
|
|
|
53
53
|
{
|
|
54
54
|
await UniTask.Yield();
|
|
55
55
|
}
|
|
56
|
-
LoadingInformation.LoadingStatus?.Invoke($"SubScene {subScene.
|
|
56
|
+
LoadingInformation.LoadingStatus?.Invoke($"SubScene {subScene.name} loaded successfully.");
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fr.jeanf.scenemanagement",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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",
|