com.elestrago.unity.entitas-redux 3.7.4 → 3.7.6

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
@@ -2,6 +2,22 @@
2
2
 
3
3
  ---
4
4
 
5
+ ## [3.7.6](https://gitlab.com/elestrago-pkg/entitas-redux/-/tags/3.7.6)
6
+
7
+ ### Fixed
8
+
9
+ - Implementation of `InitializeAsync` method in `Systems`
10
+
11
+ ---
12
+
13
+ ## [3.7.5](https://gitlab.com/elestrago-pkg/entitas-redux/-/tags/3.7.5)
14
+
15
+ ### Added
16
+
17
+ - `IInitializeAsyncSystem`
18
+
19
+ ---
20
+
5
21
  ## [3.7.4](https://gitlab.com/elestrago-pkg/entitas-redux/-/tags/3.7.4)
6
22
 
7
23
  ### Fixed
@@ -0,0 +1,14 @@
1
+ using System.Threading;
2
+ using System.Threading.Tasks;
3
+
4
+ namespace JCMG.EntitasRedux
5
+ {
6
+ public interface IInitializeAsyncSystem : IInitializeSystem
7
+ {
8
+ void IInitializeSystem.Initialize()
9
+ {
10
+ }
11
+
12
+ Task InitializeAsync(CancellationToken ct);
13
+ }
14
+ }
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: 317b63b5a6dc4edfa94787ffaacb1298
3
+ timeCreated: 1765385799
@@ -35,4 +35,4 @@ namespace JCMG.EntitasRedux
35
35
  /// </summary>
36
36
  void Initialize();
37
37
  }
38
- }
38
+ }
@@ -25,6 +25,8 @@ THE SOFTWARE.
25
25
 
26
26
  using System;
27
27
  using System.Collections.Generic;
28
+ using System.Threading;
29
+ using System.Threading.Tasks;
28
30
  using EntitasRedux.Core.Libs;
29
31
 
30
32
  namespace JCMG.EntitasRedux
@@ -36,7 +38,7 @@ namespace JCMG.EntitasRedux
36
38
  /// All systems will be initialized and executed based on the order
37
39
  /// you added them.
38
40
  /// </summary>
39
- public class Systems : IInitializeSystem,
41
+ public class Systems : IInitializeAsyncSystem,
40
42
  IUpdateSystem,
41
43
  IFixedUpdateSystem,
42
44
  ILateUpdateSystem,
@@ -44,35 +46,20 @@ namespace JCMG.EntitasRedux
44
46
  ICleanupSystem,
45
47
  ITearDownSystem
46
48
  {
47
- protected readonly List<IFixedUpdateSystem> _fixedUpdateSystems;
48
- protected readonly List<IUpdateSystem> _updateSystems;
49
- protected readonly List<ILateUpdateSystem> _lateUpdateSystems;
50
- protected readonly List<IReactiveSystem> _reactiveSystems;
49
+ protected readonly List<IFixedUpdateSystem> _fixedUpdateSystems = new();
50
+ protected readonly List<IUpdateSystem> _updateSystems = new();
51
+ protected readonly List<ILateUpdateSystem> _lateUpdateSystems = new();
52
+ protected readonly List<IReactiveSystem> _reactiveSystems = new();
51
53
 
52
- protected readonly List<IInitializeSystem> _initializeSystems;
53
- protected readonly List<ICleanupSystem> _cleanupSystems;
54
- protected readonly List<ITearDownSystem> _tearDownSystems;
54
+ protected readonly List<IInitializeSystem> _initializeSystems = new();
55
+ protected readonly List<ICleanupSystem> _cleanupSystems = new();
56
+ protected readonly List<ITearDownSystem> _tearDownSystems = new();
55
57
 
56
58
  private Memory<IFixedUpdateSystem> _fixedUpdateSystemsMemory;
57
59
  private Memory<IUpdateSystem> _updateSystemsMemory;
58
60
  private Memory<ILateUpdateSystem> _lateUpdateSystemsMemory;
59
61
  private Memory<ICleanupSystem> _cleanupSystemsMemory;
60
62
 
61
- /// <summary>
62
- /// Creates a new Systems instance.
63
- /// </summary>
64
- public Systems()
65
- {
66
- _fixedUpdateSystems = new List<IFixedUpdateSystem>();
67
- _updateSystems = new List<IUpdateSystem>();
68
- _lateUpdateSystems = new List<ILateUpdateSystem>();
69
- _reactiveSystems = new List<IReactiveSystem>();
70
-
71
- _initializeSystems = new List<IInitializeSystem>();
72
- _cleanupSystems = new List<ICleanupSystem>();
73
- _tearDownSystems = new List<ITearDownSystem>();
74
- }
75
-
76
63
  /// <summary>
77
64
  /// Adds the <see cref="ISystem"/> instance to the systems list.
78
65
  /// </summary>
@@ -208,6 +195,30 @@ namespace JCMG.EntitasRedux
208
195
  }
209
196
  }
210
197
 
198
+ /// <summary>
199
+ /// Calls Initialize() on all <see cref="IInitializeSystem"/> and other nested systems instances in the order
200
+ /// you added them.
201
+ /// </summary>
202
+ public virtual async Task InitializeAsync(CancellationToken ct)
203
+ {
204
+ PrepareUpdateSystems();
205
+
206
+ for (var i = 0; i < _initializeSystems.Count; i++)
207
+ {
208
+ ct.ThrowIfCancellationRequested();
209
+
210
+ var initializeSystem = _initializeSystems[i];
211
+
212
+ if (initializeSystem is IInitializeAsyncSystem asyncInitializeSystem)
213
+ {
214
+ await asyncInitializeSystem.InitializeAsync(ct);
215
+ continue;
216
+ }
217
+
218
+ initializeSystem.Initialize();
219
+ }
220
+ }
221
+
211
222
  /// <summary>
212
223
  /// Calls Cleanup() on all <see cref="ICleanupSystem"/> and other nested systems instances in the order you
213
224
  /// added them.
@@ -26,6 +26,8 @@ THE SOFTWARE.
26
26
  using System.Collections.Generic;
27
27
  using System.Diagnostics;
28
28
  using System.Linq;
29
+ using System.Threading;
30
+ using System.Threading.Tasks;
29
31
  using UnityEngine;
30
32
 
31
33
  namespace JCMG.EntitasRedux.VisualDebugging
@@ -44,7 +46,28 @@ namespace JCMG.EntitasRedux.VisualDebugging
44
46
  for (var i = 0; i < _initializeSystems.Count; i++)
45
47
  {
46
48
  var system = _initializeSystems[i];
47
- total += system is DebugSystems debugSystems ? debugSystems.TotalInitializeSystemsCount : 1;
49
+ if (system is DebugSystems debugSystems)
50
+ total += debugSystems.TotalInitializeSystemsCount;
51
+ else if (system is not IInitializeAsyncSystem)
52
+ total += 1;
53
+ }
54
+
55
+ return total;
56
+ }
57
+ }
58
+
59
+ public int TotalInitializeAsyncSystemsCount
60
+ {
61
+ get
62
+ {
63
+ var total = 0;
64
+ for (var i = 0; i < _initializeSystems.Count; i++)
65
+ {
66
+ var system = _initializeSystems[i];
67
+ if (system is not IInitializeAsyncSystem)
68
+ continue;
69
+
70
+ total += system is DebugSystems debugSystems ? debugSystems.TotalInitializeAsyncSystemsCount : 1;
48
71
  }
49
72
 
50
73
  return total;
@@ -192,9 +215,11 @@ namespace JCMG.EntitasRedux.VisualDebugging
192
215
 
193
216
  public double AverageUpdateDuration => _updateSystemInfos.Select(x => x.AverageUpdateDuration).Sum();
194
217
 
195
- public double AverageFixedUpdateDuration => _fixedUpdateSystemInfos.Select(x => x.AverageFixedUpdateDuration).Sum();
218
+ public double AverageFixedUpdateDuration
219
+ => _fixedUpdateSystemInfos.Select(x => x.AverageFixedUpdateDuration).Sum();
196
220
 
197
- public double AverageLateUpdateDuration => _lateUpdateSystemInfos.Select(x => x.AverageLateUpdateDuration).Sum();
221
+ public double AverageLateUpdateDuration
222
+ => _lateUpdateSystemInfos.Select(x => x.AverageLateUpdateDuration).Sum();
198
223
 
199
224
  public double AverageReactiveDuration => _lateUpdateSystemInfos.Select(x => x.AverageReactiveDuration).Sum();
200
225
 
@@ -210,19 +235,22 @@ namespace JCMG.EntitasRedux.VisualDebugging
210
235
 
211
236
  public double CleanupDuration => _cleanupDuration;
212
237
 
213
- public IReadOnlyList<SystemInfo> InitializeSystemInfos => _initializeSystemInfos;
238
+ public IEnumerable<SystemInfo> InitializeSystemInfos => _initializeSystemInfos;
239
+
240
+ public IEnumerable<SystemInfo> InitializeAsyncSystemInfos => _initializeSystemInfos
241
+ .Where(s => s.IsInitializeAsyncSystems);
214
242
 
215
- public IReadOnlyList<SystemInfo> UpdateSystemInfos => _updateSystemInfos;
243
+ public IEnumerable<SystemInfo> UpdateSystemInfos => _updateSystemInfos;
216
244
 
217
- public IReadOnlyList<SystemInfo> FixedUpdateSystemInfos => _fixedUpdateSystemInfos;
245
+ public IEnumerable<SystemInfo> FixedUpdateSystemInfos => _fixedUpdateSystemInfos;
218
246
 
219
- public IReadOnlyList<SystemInfo> LateUpdateSystemInfos => _lateUpdateSystemInfos;
247
+ public IEnumerable<SystemInfo> LateUpdateSystemInfos => _lateUpdateSystemInfos;
220
248
 
221
- public IReadOnlyList<SystemInfo> CleanupSystemInfos => _cleanupSystemInfos;
249
+ public IEnumerable<SystemInfo> CleanupSystemInfos => _cleanupSystemInfos;
222
250
 
223
- public IReadOnlyList<SystemInfo> TearDownSystemInfos => _tearDownSystemInfos;
251
+ public IEnumerable<SystemInfo> TearDownSystemInfos => _tearDownSystemInfos;
224
252
 
225
- public IReadOnlyList<SystemInfo> ReactiveSystemInfos => _reactiveSystemInfos;
253
+ public IEnumerable<SystemInfo> ReactiveSystemInfos => _reactiveSystemInfos;
226
254
 
227
255
  private string _name;
228
256
  private GameObject _gameObject;
@@ -366,14 +394,36 @@ namespace JCMG.EntitasRedux.VisualDebugging
366
394
  for (var i = 0; i < _initializeSystems.Count; i++)
367
395
  {
368
396
  var systemInfo = _initializeSystemInfos[i];
369
- if (systemInfo.isActive)
370
- {
371
- _stopwatch.Reset();
372
- _stopwatch.Start();
373
- _initializeSystems[i].Initialize();
374
- _stopwatch.Stop();
375
- systemInfo.InitializationDuration = _stopwatch.Elapsed.TotalMilliseconds;
376
- }
397
+ if (!systemInfo.isActive)
398
+ continue;
399
+
400
+ _stopwatch.Reset();
401
+ _stopwatch.Start();
402
+ _initializeSystems[i].Initialize();
403
+ _stopwatch.Stop();
404
+ systemInfo.InitializationDuration = _stopwatch.Elapsed.TotalMilliseconds;
405
+ }
406
+ }
407
+
408
+ public override async Task InitializeAsync(CancellationToken ct)
409
+ {
410
+ for (var i = 0; i < _initializeSystems.Count; i++)
411
+ {
412
+ var systemInfo = _initializeSystemInfos[i];
413
+ if (!systemInfo.isActive)
414
+ continue;
415
+
416
+ _stopwatch.Reset();
417
+ _stopwatch.Start();
418
+
419
+ var initializeSystem = _initializeSystems[i];
420
+ if (initializeSystem is IInitializeAsyncSystem asyncInitializeSystem)
421
+ await asyncInitializeSystem.InitializeAsync(ct);
422
+ else
423
+ initializeSystem.Initialize();
424
+
425
+ _stopwatch.Stop();
426
+ systemInfo.InitializationDuration = _stopwatch.Elapsed.TotalMilliseconds;
377
427
  }
378
428
  }
379
429
 
@@ -388,16 +438,16 @@ namespace JCMG.EntitasRedux.VisualDebugging
388
438
  for (var i = 0; i < _updateSystems.Count; i++)
389
439
  {
390
440
  var systemInfo = _updateSystemInfos[i];
391
- if (systemInfo.isActive)
392
- {
393
- _stopwatch.Reset();
394
- _stopwatch.Start();
395
- _updateSystems[i].Update();
396
- _stopwatch.Stop();
397
- var duration = _stopwatch.Elapsed.TotalMilliseconds;
398
- _updateDuration += duration;
399
- systemInfo.AddUpdateDuration(duration);
400
- }
441
+ if (!systemInfo.isActive)
442
+ continue;
443
+
444
+ _stopwatch.Reset();
445
+ _stopwatch.Start();
446
+ _updateSystems[i].Update();
447
+ _stopwatch.Stop();
448
+ var duration = _stopwatch.Elapsed.TotalMilliseconds;
449
+ _updateDuration += duration;
450
+ systemInfo.AddUpdateDuration(duration);
401
451
  }
402
452
  }
403
453
 
@@ -407,16 +457,16 @@ namespace JCMG.EntitasRedux.VisualDebugging
407
457
  for (var i = 0; i < _fixedUpdateSystems.Count; i++)
408
458
  {
409
459
  var systemInfo = _fixedUpdateSystemInfos[i];
410
- if (systemInfo.isActive)
411
- {
412
- _stopwatch.Reset();
413
- _stopwatch.Start();
414
- _fixedUpdateSystems[i].FixedUpdate();
415
- _stopwatch.Stop();
416
- var duration = _stopwatch.Elapsed.TotalMilliseconds;
417
- _fixedUpdateDuration += duration;
418
- systemInfo.AddFixedUpdateDuration(duration);
419
- }
460
+ if (!systemInfo.isActive)
461
+ continue;
462
+
463
+ _stopwatch.Reset();
464
+ _stopwatch.Start();
465
+ _fixedUpdateSystems[i].FixedUpdate();
466
+ _stopwatch.Stop();
467
+ var duration = _stopwatch.Elapsed.TotalMilliseconds;
468
+ _fixedUpdateDuration += duration;
469
+ systemInfo.AddFixedUpdateDuration(duration);
420
470
  }
421
471
  }
422
472
 
@@ -426,16 +476,16 @@ namespace JCMG.EntitasRedux.VisualDebugging
426
476
  for (var i = 0; i < _lateUpdateSystems.Count; i++)
427
477
  {
428
478
  var systemInfo = _lateUpdateSystemInfos[i];
429
- if (systemInfo.isActive)
430
- {
431
- _stopwatch.Reset();
432
- _stopwatch.Start();
433
- _lateUpdateSystems[i].LateUpdate();
434
- _stopwatch.Stop();
435
- var duration = _stopwatch.Elapsed.TotalMilliseconds;
436
- _lateUpdateDuration += duration;
437
- systemInfo.AddLateUpdateDuration(duration);
438
- }
479
+ if (!systemInfo.isActive)
480
+ continue;
481
+
482
+ _stopwatch.Reset();
483
+ _stopwatch.Start();
484
+ _lateUpdateSystems[i].LateUpdate();
485
+ _stopwatch.Stop();
486
+ var duration = _stopwatch.Elapsed.TotalMilliseconds;
487
+ _lateUpdateDuration += duration;
488
+ systemInfo.AddLateUpdateDuration(duration);
439
489
  }
440
490
  }
441
491
 
@@ -445,16 +495,16 @@ namespace JCMG.EntitasRedux.VisualDebugging
445
495
  for (var i = 0; i < _cleanupSystems.Count; i++)
446
496
  {
447
497
  var systemInfo = _cleanupSystemInfos[i];
448
- if (systemInfo.isActive)
449
- {
450
- _stopwatch.Reset();
451
- _stopwatch.Start();
452
- _cleanupSystems[i].Cleanup();
453
- _stopwatch.Stop();
454
- var duration = _stopwatch.Elapsed.TotalMilliseconds;
455
- _cleanupDuration += duration;
456
- systemInfo.AddCleanupDuration(duration);
457
- }
498
+ if (!systemInfo.isActive)
499
+ continue;
500
+
501
+ _stopwatch.Reset();
502
+ _stopwatch.Start();
503
+ _cleanupSystems[i].Cleanup();
504
+ _stopwatch.Stop();
505
+ var duration = _stopwatch.Elapsed.TotalMilliseconds;
506
+ _cleanupDuration += duration;
507
+ systemInfo.AddCleanupDuration(duration);
458
508
  }
459
509
  }
460
510
 
@@ -463,15 +513,15 @@ namespace JCMG.EntitasRedux.VisualDebugging
463
513
  for (var i = 0; i < _tearDownSystems.Count; i++)
464
514
  {
465
515
  var systemInfo = _tearDownSystemInfos[i];
466
- if (systemInfo.isActive)
467
- {
468
- _stopwatch.Reset();
469
- _stopwatch.Start();
470
- _tearDownSystems[i].TearDown();
471
- _stopwatch.Stop();
472
- systemInfo.TeardownDuration = _stopwatch.Elapsed.TotalMilliseconds;
473
- }
516
+ if (!systemInfo.isActive)
517
+ continue;
518
+
519
+ _stopwatch.Reset();
520
+ _stopwatch.Start();
521
+ _tearDownSystems[i].TearDown();
522
+ _stopwatch.Stop();
523
+ systemInfo.TeardownDuration = _stopwatch.Elapsed.TotalMilliseconds;
474
524
  }
475
525
  }
476
526
  }
477
- }
527
+ }
@@ -31,15 +31,17 @@ namespace JCMG.EntitasRedux.VisualDebugging
31
31
  public enum SystemInterfaceFlags
32
32
  {
33
33
  None = 0,
34
- InitializeSystem = 1 << 1,
35
- FixedUpdateSystem = 1 << 6,
34
+ InitializeSystem = 1 << 0,
35
+ InitializeAsyncSystem = 1 << 1,
36
36
  UpdateSystem = 1 << 2,
37
- LateUpdateSystem = 1 << 7,
38
- ReactiveSystem = 1 << 5,
39
37
  CleanupSystem = 1 << 3,
40
- TearDownSystem = 1 << 4
38
+ TearDownSystem = 1 << 4,
39
+ ReactiveSystem = 1 << 5,
40
+ FixedUpdateSystem = 1 << 6,
41
+ LateUpdateSystem = 1 << 7,
41
42
  }
42
43
 
44
+
43
45
  public class SystemInfo
44
46
  {
45
47
  public ISystem System { get; }
@@ -52,7 +54,10 @@ namespace JCMG.EntitasRedux.VisualDebugging
52
54
  #region SystemInterfaceFlag Properties
53
55
 
54
56
  public bool IsInitializeSystems =>
55
- (_interfaceFlags & SystemInterfaceFlags.InitializeSystem) == SystemInterfaceFlags.InitializeSystem;
57
+ (_interfaceFlags & SystemInterfaceFlags.InitializeSystem) > 0;
58
+
59
+ public bool IsInitializeAsyncSystems =>
60
+ (_interfaceFlags & SystemInterfaceFlags.InitializeAsyncSystem) > 0;
56
61
 
57
62
  public bool IsUpdateSystems =>
58
63
  (_interfaceFlags & SystemInterfaceFlags.UpdateSystem) == SystemInterfaceFlags.UpdateSystem;
@@ -306,11 +311,17 @@ namespace JCMG.EntitasRedux.VisualDebugging
306
311
  private static SystemInterfaceFlags GetInterfaceFlags(ISystem system)
307
312
  {
308
313
  var flags = SystemInterfaceFlags.None;
314
+
309
315
  if (system is IInitializeSystem)
310
316
  {
311
317
  flags |= SystemInterfaceFlags.InitializeSystem;
312
318
  }
313
319
 
320
+ if (system is IInitializeAsyncSystem)
321
+ {
322
+ flags |= SystemInterfaceFlags.InitializeAsyncSystem;
323
+ }
324
+
314
325
  if (system is IFixedUpdateSystem)
315
326
  {
316
327
  flags |= SystemInterfaceFlags.FixedUpdateSystem;
@@ -344,4 +355,4 @@ namespace JCMG.EntitasRedux.VisualDebugging
344
355
  return flags;
345
356
  }
346
357
  }
347
- }
358
+ }
@@ -60,6 +60,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
60
60
  private static bool _showSystemsList = true;
61
61
 
62
62
  private static bool _showInitializeSystems = true;
63
+ private static bool _showInitializeAsyncSystems = true;
63
64
  private static bool _showFixedUpdateSystems = true;
64
65
  private static bool _showUpdateSystems = true;
65
66
  private static bool _showLateUpdateSystems = true;
@@ -94,6 +95,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
94
95
 
95
96
  // System Section Titles
96
97
  private const string INITIALIZE_SYSTEMS_TITLE = "Initialize Systems";
98
+ private const string INITIALIZE_ASYNC_SYSTEMS_TITLE = "Initialize Async Systems";
97
99
  private const string FIXED_UPDATE_SYSTEMS_TITLE = "Fixed Update Systems";
98
100
  private const string UPDATE_SYSTEMS_TITLE = "Update Systems";
99
101
  private const string LATE_UPDATE_SYSTEMS_TITLE = "Late Update Systems";
@@ -103,6 +105,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
103
105
 
104
106
  // Count Labels
105
107
  private const string INITIALIZE_SYSTEMS_COUNT_LABEL = "Initialize Systems";
108
+ private const string INITIALIZE_ASYNC_SYSTEMS_COUNT_LABEL = "Initialize Async Systems";
106
109
  private const string FIXED_UPDATE_SYSTEMS_COUNT_LABEL = "Fixed Update Systems";
107
110
  private const string UPDATE_SYSTEMS_COUNT_LABEL = "Update Systems";
108
111
  private const string LATE_UPDATE_SYSTEMS_COUNT_LABEL = "Late Update Systems";
@@ -190,6 +193,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
190
193
  using (new EditorGUILayout.VerticalScope(EntitasReduxStyles.SectionContent))
191
194
  {
192
195
  EditorGUILayout.LabelField(INITIALIZE_SYSTEMS_COUNT_LABEL, systems.TotalInitializeSystemsCount.ToString());
196
+ EditorGUILayout.LabelField(INITIALIZE_ASYNC_SYSTEMS_COUNT_LABEL, systems.TotalInitializeAsyncSystemsCount.ToString());
193
197
  EditorGUILayout.LabelField(FIXED_UPDATE_SYSTEMS_COUNT_LABEL, systems.TotalFixedUpdateSystemsCount.ToString());
194
198
  EditorGUILayout.LabelField(UPDATE_SYSTEMS_COUNT_LABEL, systems.TotalUpdateSystemsCount.ToString());
195
199
  EditorGUILayout.LabelField(LATE_UPDATE_SYSTEMS_COUNT_LABEL, systems.TotalLateUpdateSystemsCount.ToString());
@@ -354,6 +358,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
354
358
  EditorGUILayout.Space();
355
359
 
356
360
  DrawSystemSection(INITIALIZE_SYSTEMS_TITLE, ref _showInitializeSystems, systems, SystemInterfaceFlags.InitializeSystem);
361
+ DrawSystemSection(INITIALIZE_ASYNC_SYSTEMS_TITLE, ref _showInitializeAsyncSystems, systems, SystemInterfaceFlags.InitializeAsyncSystem);
357
362
  DrawSystemSection(FIXED_UPDATE_SYSTEMS_TITLE, ref _showFixedUpdateSystems, systems, SystemInterfaceFlags.FixedUpdateSystem);
358
363
  DrawSystemSection(UPDATE_SYSTEMS_TITLE, ref _showUpdateSystems, systems, SystemInterfaceFlags.UpdateSystem);
359
364
  DrawSystemSection(LATE_UPDATE_SYSTEMS_TITLE, ref _showLateUpdateSystems, systems, SystemInterfaceFlags.LateUpdateSystem);
@@ -393,6 +398,10 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
393
398
  systemInfos = systems.InitializeSystemInfos
394
399
  .Where(systemInfo => systemInfo.InitializationDuration >= _threshold);
395
400
  break;
401
+ case SystemInterfaceFlags.InitializeAsyncSystem:
402
+ systemInfos = systems.InitializeAsyncSystemInfos
403
+ .Where(systemInfo => systemInfo.InitializationDuration >= _threshold);
404
+ break;
396
405
  case SystemInterfaceFlags.FixedUpdateSystem:
397
406
  systemInfos = systems.FixedUpdateSystemInfos
398
407
  .Where(systemInfo => systemInfo.AverageFixedUpdateDuration >= _threshold);
@@ -479,6 +488,7 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
479
488
  switch (type)
480
489
  {
481
490
  case SystemInterfaceFlags.InitializeSystem:
491
+ case SystemInterfaceFlags.InitializeAsyncSystem:
482
492
  DrawSimpleSystemInfoPerformance(
483
493
  systemInfo.SystemName,
484
494
  systemInfo.InitializationDuration,
@@ -614,6 +624,8 @@ namespace JCMG.EntitasRedux.VisualDebugging.Editor
614
624
  {
615
625
  case SystemInterfaceFlags.InitializeSystem:
616
626
  return systems.TotalInitializeSystemsCount > 0;
627
+ case SystemInterfaceFlags.InitializeAsyncSystem:
628
+ return systems.TotalInitializeAsyncSystemsCount > 0;
617
629
  case SystemInterfaceFlags.FixedUpdateSystem:
618
630
  return systems.TotalFixedUpdateSystemsCount > 0;
619
631
  case SystemInterfaceFlags.UpdateSystem:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.elestrago.unity.entitas-redux",
3
- "version": "3.7.4",
3
+ "version": "3.7.6",
4
4
  "displayName": "JCMG Entitas Redux",
5
5
  "description": "Entitas Redux is an fast, accessible, and feature-rich ECS framework for Unity. It leverages code generation and an extensible plugin framework to make life easier for developers.",
6
6
  "category": "Unity",