com.artromskiy.deltaecs.unity 0.0.57 → 0.0.59
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.
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/Runtime/SceneWorld.cs
CHANGED
|
@@ -164,6 +164,24 @@ namespace Delta.ECS.Unity
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
/// <summary>Resolves the runtime view first, then the scene-authored stable-ID binding.</summary>
|
|
168
|
+
public bool TryGetView(Entity entity, [NotNullWhen(true)] out GameObject view)
|
|
169
|
+
{
|
|
170
|
+
if (_viewsByEntity.TryGetValue(entity, out view) && view != null)
|
|
171
|
+
{
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (_viewsByEntity.ContainsKey(entity))
|
|
176
|
+
{
|
|
177
|
+
_viewsByEntity.Remove(entity);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return _authoring != null
|
|
181
|
+
&& TryGetStableId(entity, out string stableId)
|
|
182
|
+
&& _authoring.TryGetView(stableId, out view);
|
|
183
|
+
}
|
|
184
|
+
|
|
167
185
|
internal static bool TryFindLiveWorld(SceneData sceneData, out SceneWorld sceneWorld)
|
|
168
186
|
{
|
|
169
187
|
for (int i = LiveWorlds.Count - 1; i >= 0; i--)
|
|
@@ -344,24 +362,6 @@ namespace Delta.ECS.Unity
|
|
|
344
362
|
internal bool TryGetStableId(Entity entity, out string stableId) =>
|
|
345
363
|
_stableIdsByEntity.TryGetValue(entity, out stableId);
|
|
346
364
|
|
|
347
|
-
/// <summary>Resolves the runtime view first, then the scene-authored stable-ID binding.</summary>
|
|
348
|
-
internal bool TryGetView(Entity entity, out GameObject view)
|
|
349
|
-
{
|
|
350
|
-
if (_viewsByEntity.TryGetValue(entity, out view) && view != null)
|
|
351
|
-
{
|
|
352
|
-
return true;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (_viewsByEntity.ContainsKey(entity))
|
|
356
|
-
{
|
|
357
|
-
_viewsByEntity.Remove(entity);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
return _authoring != null
|
|
361
|
-
&& TryGetStableId(entity, out string stableId)
|
|
362
|
-
&& _authoring.TryGetView(stableId, out view);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
365
|
/// <summary>Resolves a view through the runtime registry or the scene-authored stable-ID binding.</summary>
|
|
366
366
|
internal bool TryGetEntity(GameObject view, out Entity entity)
|
|
367
367
|
{
|