com.wallstop-studios.unity-helpers 2.0.0-rc80.7 → 2.0.0-rc80.8

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,11 +1,13 @@
1
1
  namespace WallstopStudios.UnityHelpers.Utils
2
2
  {
3
3
  using System;
4
- using System.Collections.Concurrent;
5
4
  using System.Collections.Generic;
6
5
  using System.Text;
7
- using System.Threading;
8
6
  using UnityEngine;
7
+ #if !SINGLE_THREADED
8
+ using System.Threading;
9
+ using System.Collections.Concurrent;
10
+ #endif
9
11
 
10
12
  public static class Buffers
11
13
  {
@@ -71,33 +73,6 @@ namespace WallstopStudios.UnityHelpers.Utils
71
73
  return new PooledResource<T>(value, _onRelease);
72
74
  }
73
75
 
74
- public static Action<T> GetClearAction()
75
- {
76
- try
77
- {
78
- Type type = typeof(T);
79
- foreach (
80
- MethodInfo method in type.GetMethods(
81
- BindingFlags.Instance | BindingFlags.Public
82
- )
83
- )
84
- {
85
- if (
86
- string.Equals(method.Name, "Clear", StringComparison.Ordinal)
87
- && method.GetParameters().Length == 0
88
- )
89
- {
90
- return (Action<T>)Delegate.CreateDelegate(typeof(Action<T>), method);
91
- }
92
- }
93
- }
94
- catch
95
- {
96
- // Swallow
97
- }
98
- return null;
99
- }
100
-
101
76
  public void Dispose()
102
77
  {
103
78
  if (_onDispose == null)
@@ -309,7 +284,6 @@ namespace WallstopStudios.UnityHelpers.Utils
309
284
  }
310
285
  }
311
286
  #else
312
-
313
287
  public static class WallstopFastArrayPool<T>
314
288
  {
315
289
  private static readonly ReaderWriterLockSlim _lock = new();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.unity-helpers",
3
- "version": "2.0.0-rc80.7",
3
+ "version": "2.0.0-rc80.8",
4
4
  "displayName": "Unity Helpers",
5
5
  "description": "Various Unity Helper Library",
6
6
  "dependencies": {},
@@ -35,29 +35,4 @@
35
35
  "scripts": {
36
36
  "test": "echo \"Error: no test specified\" && exit 1"
37
37
  }
38
- }
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
38
+ }