com.wallstop-studios.unity-helpers 2.0.0-rc41 → 2.0.0-rc42
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.
|
@@ -171,10 +171,9 @@
|
|
|
171
171
|
{
|
|
172
172
|
if (component == null)
|
|
173
173
|
{
|
|
174
|
-
|
|
174
|
+
yield break;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
Queue<Transform> results = new();
|
|
178
177
|
Queue<Transform> iteration = new();
|
|
179
178
|
iteration.Enqueue(component.transform);
|
|
180
179
|
while (iteration.TryDequeue(out Transform current))
|
|
@@ -182,12 +181,10 @@
|
|
|
182
181
|
for (int i = 0; i < current.childCount; ++i)
|
|
183
182
|
{
|
|
184
183
|
Transform childTransform = current.GetChild(i);
|
|
185
|
-
results.Enqueue(childTransform);
|
|
186
184
|
iteration.Enqueue(childTransform);
|
|
185
|
+
yield return childTransform;
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
|
-
|
|
190
|
-
return results;
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
}
|
package/Runtime/Utils/Buffers.cs
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
{
|
|
8
8
|
public const int BufferSize = 10_000;
|
|
9
9
|
|
|
10
|
-
public static readonly HashSet<Collider2D> UniqueColliders = new();
|
|
11
10
|
public static readonly Collider2D[] Colliders = new Collider2D[BufferSize];
|
|
12
11
|
public static readonly RaycastHit2D[] RaycastHits = new RaycastHit2D[BufferSize];
|
|
13
12
|
|
|
@@ -16,6 +15,8 @@
|
|
|
16
15
|
DO NOT USE with random values.
|
|
17
16
|
*/
|
|
18
17
|
public static readonly Dictionary<float, WaitForSeconds> WaitForSeconds = new();
|
|
18
|
+
public static readonly Dictionary<float, WaitForSecondsRealtime> WaitForSecondsRealtime =
|
|
19
|
+
new();
|
|
19
20
|
public static readonly System.Random Random = new();
|
|
20
21
|
public static readonly WaitForFixedUpdate WaitForFixedUpdate = new();
|
|
21
22
|
public static readonly WaitForEndOfFrame WaitForEndOfFrame = new();
|