com.wallstop-studios.unity-helpers 2.1.2 → 2.1.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.
@@ -118,7 +118,9 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
118
118
  }
119
119
 
120
120
  internal static string[] AllSpriteLabels { get; private set; } = Array.Empty<string>();
121
+ #if UNITY_EDITOR
121
122
  private static bool SpriteLabelCacheInitialized;
123
+ #endif
122
124
 
123
125
  /// <summary>
124
126
  /// Gets all unique sprite labels in the project (Editor only).
@@ -321,7 +323,9 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
321
323
  if (labels == null || labels.Count == 0)
322
324
  {
323
325
  AllSpriteLabels = Array.Empty<string>();
326
+ #if UNITY_EDITOR
324
327
  SpriteLabelCacheInitialized = true;
328
+ #endif
325
329
  return;
326
330
  }
327
331
 
@@ -350,12 +354,16 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
350
354
  }
351
355
 
352
356
  AllSpriteLabels = cache;
357
+ #if UNITY_EDITOR
353
358
  SpriteLabelCacheInitialized = true;
359
+ #endif
354
360
  }
355
361
 
356
362
  internal static void ResetSpriteLabelCache()
357
363
  {
364
+ #if UNITY_EDITOR
358
365
  SpriteLabelCacheInitialized = false;
366
+ #endif
359
367
  AllSpriteLabels = Array.Empty<string>();
360
368
  }
361
369
 
@@ -3598,14 +3598,14 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
3598
3598
 
3599
3599
  private static bool IsIndexerGetterStrategyUnavailable(CapabilityKey<PropertyInfo> key)
3600
3600
  {
3601
- return IndexerGetterStrategyBlocklist.Contains(key);
3601
+ return IndexerGetterStrategyBlocklist.ContainsKey(key);
3602
3602
  }
3603
3603
 
3604
3604
  private static void MarkIndexerGetterStrategyUnavailable(
3605
3605
  CapabilityKey<PropertyInfo> key
3606
3606
  )
3607
3607
  {
3608
- IndexerGetterStrategyBlocklist.Add(key);
3608
+ IndexerGetterStrategyBlocklist[key] = StrategyUnavailableSentinel;
3609
3609
  }
3610
3610
 
3611
3611
  private static bool TryGetIndexerSetterFromCache(
@@ -3632,14 +3632,14 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
3632
3632
 
3633
3633
  private static bool IsIndexerSetterStrategyUnavailable(CapabilityKey<PropertyInfo> key)
3634
3634
  {
3635
- return IndexerSetterStrategyBlocklist.Contains(key);
3635
+ return IndexerSetterStrategyBlocklist.ContainsKey(key);
3636
3636
  }
3637
3637
 
3638
3638
  private static void MarkIndexerSetterStrategyUnavailable(
3639
3639
  CapabilityKey<PropertyInfo> key
3640
3640
  )
3641
3641
  {
3642
- IndexerSetterStrategyBlocklist.Add(key);
3642
+ IndexerSetterStrategyBlocklist[key] = StrategyUnavailableSentinel;
3643
3643
  }
3644
3644
 
3645
3645
  private static bool TryGetMethodInvokerFromCache(
@@ -3666,12 +3666,12 @@ namespace WallstopStudios.UnityHelpers.Core.Helper
3666
3666
 
3667
3667
  private static bool IsMethodInvokerStrategyUnavailable(CapabilityKey<MethodInfo> key)
3668
3668
  {
3669
- return MethodInvokerStrategyBlocklist.Contains(key);
3669
+ return MethodInvokerStrategyBlocklist.ContainsKey(key);
3670
3670
  }
3671
3671
 
3672
3672
  private static void MarkMethodInvokerStrategyUnavailable(CapabilityKey<MethodInfo> key)
3673
3673
  {
3674
- MethodInvokerStrategyBlocklist.Add(key);
3674
+ MethodInvokerStrategyBlocklist[key] = StrategyUnavailableSentinel;
3675
3675
  }
3676
3676
 
3677
3677
  private static bool TryGetStaticMethodInvokerFromCache(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.unity-helpers",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "displayName": "Unity Helpers",
5
5
  "description": "Various Unity Helper Library",
6
6
  "dependencies": {},