com.wallstop-studios.unity-helpers 1.0.0-rc6 → 1.0.0-rc8

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.
@@ -1,5 +1,6 @@
1
1
  namespace UnityHelpers.Editor
2
2
  {
3
+ #if UNITY_EDITOR
3
4
  using System;
4
5
  using System.Collections.Generic;
5
6
  using System.Linq;
@@ -14,14 +15,9 @@
14
15
  public const int DefaultFramesPerSecond = 12;
15
16
 
16
17
  public List<Texture2D> frames;
17
- public int framesPerSecond;
18
+ public int framesPerSecond = DefaultFramesPerSecond;
18
19
  public string animationName;
19
20
  public string assetPath;
20
-
21
- public AnimationData()
22
- {
23
- framesPerSecond = DefaultFramesPerSecond;
24
- }
25
21
  }
26
22
 
27
23
  public sealed class AnimationCreator : ScriptableWizard
@@ -215,4 +211,5 @@
215
211
  }
216
212
  }
217
213
  }
214
+ #endif
218
215
  }
@@ -1,5 +1,6 @@
1
1
  namespace UnityHelpers.Editor
2
2
  {
3
+ #if UNITY_EDITOR
3
4
  using System;
4
5
  using System.Linq;
5
6
  using System.Collections.Generic;
@@ -739,4 +740,5 @@
739
740
  }
740
741
  }
741
742
  }
743
+ #endif
742
744
  }
@@ -1,5 +1,6 @@
1
1
  namespace UnityHelpers.Editor
2
2
  {
3
+ #if UNITY_EDITOR
3
4
  using System;
4
5
  using System.Collections;
5
6
  using System.Collections.Generic;
@@ -137,4 +138,5 @@
137
138
  }
138
139
  }
139
140
  }
141
+ #endif
140
142
  }
@@ -642,7 +642,7 @@
642
642
  private static IEnumerator FunctionAsCoroutine(Action action, float updateRate, bool useJitter, bool waitBefore)
643
643
  {
644
644
  bool usedJitter = false;
645
- WaitForSeconds wait = Buffers.WaitForSeconds.GetOrAdd(updateRate, time => new WaitForSeconds(time));
645
+ WaitForSeconds wait = new(updateRate);
646
646
 
647
647
  while (true)
648
648
  {
@@ -722,7 +722,11 @@
722
722
 
723
723
  private static IEnumerator FunctionDelayAsCoroutine(Action action, float delay)
724
724
  {
725
- yield return Buffers.WaitForSeconds.GetOrAdd(delay, time => new WaitForSeconds(time));
725
+ float startTime = Time.time;
726
+ while (!HasEnoughTimePassed(startTime, delay))
727
+ {
728
+ yield return null;
729
+ }
726
730
  action();
727
731
  }
728
732
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.unity-helpers",
3
- "version": "1.0.0-rc6",
3
+ "version": "1.0.0-rc8",
4
4
  "displayName": "Unity Helpers",
5
5
  "description": "Various Unity Helper Library",
6
6
  "dependencies": {