fr.jeanf.scenemanagement 0.7.2 → 0.7.3

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.
@@ -122,6 +122,7 @@ namespace jeanf.SceneManagement
122
122
  _sectionsToLoad.Clear();
123
123
 
124
124
  var ecb = new EntityCommandBuffer(Allocator.Temp);
125
+ bool interceptedNewSections = false;
125
126
 
126
127
  for (int i = 0; i < sectionEntities.Length; i++)
127
128
  {
@@ -155,6 +156,8 @@ namespace jeanf.SceneManagement
155
156
  if (isNewSection)
156
157
  {
157
158
  s_InterceptMarker.Begin();
159
+ interceptedNewSections = true;
160
+
158
161
  if (!shouldBeLoaded)
159
162
  {
160
163
  if (hasRequestSceneLoaded)
@@ -168,11 +171,18 @@ namespace jeanf.SceneManagement
168
171
  SceneSystem.UnloadScene(state.WorldUnmanaged, sectionEntity, SceneSystem.UnloadParameters.Default);
169
172
  }
170
173
  }
174
+ else
175
+ {
176
+ if (!hasRequestSceneLoaded)
177
+ {
178
+ ecb.AddComponent<RequestSceneLoaded>(sectionEntity);
179
+ }
180
+ }
171
181
 
172
182
  _interceptedSections.Add(sectionEntity);
173
183
  s_InterceptMarker.End();
174
184
  }
175
- else if (hasPlayer && playerMoved)
185
+ else if (hasPlayer && (playerMoved || interceptedNewSections))
176
186
  {
177
187
  s_LoadUnloadMarker.Begin();
178
188
  if (shouldBeLoaded)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fr.jeanf.scenemanagement",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
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",