com.wallstop-studios.unity-helpers 2.0.0-rc69 → 2.0.0-rc71
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/Editor/AnimationCopier.cs +875 -93
- package/Editor/AnimationCreator.cs +840 -137
- package/Editor/AnimationEventEditor.cs +4 -4
- package/Editor/AnimatorControllerCopier.cs +3 -3
- package/Editor/Extensions/UnityExtensions.cs +26 -0
- package/Editor/Extensions/UnityExtensions.cs.meta +3 -0
- package/Editor/Extensions.meta +3 -0
- package/Editor/FitTextureSizeWindow.cs +371 -0
- package/Editor/PrefabChecker.cs +722 -0
- package/Editor/SpriteAtlasGenerator.cs +598 -0
- package/Editor/SpriteAtlasGenerator.cs.meta +3 -0
- package/Editor/SpriteCropper.cs +407 -0
- package/Editor/SpriteCropper.cs.meta +3 -0
- package/Editor/SpriteSettingsApplier.cs +756 -92
- package/Editor/TextureResizerWizard.cs +3 -3
- package/Editor/TextureSettingsApplier.cs +9 -9
- package/Editor/WShowIfPropertyDrawer.cs +2 -2
- package/Runtime/Core/Attributes/EnumDisplayNameAttribute.cs +15 -0
- package/Runtime/Core/Attributes/EnumDisplayNameAttribute.cs.meta +3 -0
- package/Runtime/Core/Extension/EnumExtensions.cs +176 -1
- package/Runtime/Core/Extension/UnityExtensions.cs +1 -1
- package/Runtime/Tags/AttributeUtilities.cs +8 -7
- package/Runtime/Tags/EffectHandler.cs +2 -1
- package/Tests/Runtime/DataStructures/BalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/DataStructures/CyclicBufferTests.cs +1 -1
- package/Tests/Runtime/DataStructures/QuadTreeTests.cs +1 -1
- package/Tests/Runtime/DataStructures/UnbalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/Extensions/DictionaryExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/EnumExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/IListExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/LoggingExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/RandomExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/StringExtensionTests.cs +1 -1
- package/Tests/Runtime/Helper/WallMathTests.cs +1 -1
- package/Tests/Runtime/Performance/KDTreePerformanceTests.cs +1 -1
- package/Tests/Runtime/Performance/QuadTreePerformanceTests.cs +1 -1
- package/Tests/Runtime/Performance/SpatialTreePerformanceTest.cs +1 -1
- package/Tests/Runtime/Performance/UnbalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/Random/RandomTestBase.cs +2 -2
- package/Tests/Runtime/Serialization/JsonSerializationTest.cs +1 -1
- package/package.json +1 -1
- package/Editor/FitTextureSizeWizard.cs +0 -147
- package/Editor/PrefabCheckWizard.cs +0 -167
- /package/Editor/{FitTextureSizeWizard.cs.meta → FitTextureSizeWindow.cs.meta} +0 -0
- /package/Editor/{PrefabCheckWizard.cs.meta → PrefabChecker.cs.meta} +0 -0
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
using UnityEditor;
|
|
10
10
|
using UnityEngine;
|
|
11
11
|
using UnityEngine.Serialization;
|
|
12
|
-
using
|
|
13
|
-
using
|
|
12
|
+
using Core.Extension;
|
|
13
|
+
using Core.Helper;
|
|
14
14
|
using WallstopStudios.UnityHelpers.Utils;
|
|
15
15
|
using Object = UnityEngine.Object;
|
|
16
16
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
public float widthMultiplier = 0.54f;
|
|
40
40
|
public float heightMultiplier = 0.245f;
|
|
41
41
|
|
|
42
|
-
[MenuItem("Tools/Unity Helpers/Texture Resizer")]
|
|
42
|
+
[MenuItem("Tools/Wallstop Studios/Unity Helpers/Texture Resizer")]
|
|
43
43
|
public static void ResizeTextures()
|
|
44
44
|
{
|
|
45
45
|
_ = DisplayWizard<TextureResizerWizard>("Texture Resizer", "Resize");
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
using System.Linq;
|
|
8
8
|
using UnityEditor;
|
|
9
9
|
using UnityEngine;
|
|
10
|
-
using
|
|
11
|
-
using
|
|
10
|
+
using Core.Attributes;
|
|
11
|
+
using Core.Extension;
|
|
12
12
|
using WallstopStudios.UnityHelpers.Utils;
|
|
13
13
|
using Object = UnityEngine.Object;
|
|
14
14
|
|
|
15
15
|
public sealed class TextureSettingsApplier : ScriptableWizard
|
|
16
16
|
{
|
|
17
|
-
public bool applyReadOnly
|
|
18
|
-
public bool isReadOnly
|
|
19
|
-
public bool applyMipMaps
|
|
20
|
-
public bool generateMipMaps
|
|
21
|
-
public bool applyWrapMode
|
|
17
|
+
public bool applyReadOnly;
|
|
18
|
+
public bool isReadOnly;
|
|
19
|
+
public bool applyMipMaps;
|
|
20
|
+
public bool generateMipMaps;
|
|
21
|
+
public bool applyWrapMode;
|
|
22
22
|
|
|
23
23
|
[WShowIf(nameof(applyWrapMode))]
|
|
24
24
|
public TextureWrapMode wrapMode = TextureWrapMode.Clamp;
|
|
25
25
|
|
|
26
|
-
public bool applyFilterMode
|
|
26
|
+
public bool applyFilterMode;
|
|
27
27
|
|
|
28
28
|
[WShowIf(nameof(applyFilterMode))]
|
|
29
29
|
public FilterMode filterMode = FilterMode.Trilinear;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
)]
|
|
43
43
|
public List<Object> directories = new();
|
|
44
44
|
|
|
45
|
-
[MenuItem("Tools/Unity Helpers/Texture Settings Applier")]
|
|
45
|
+
[MenuItem("Tools/Wallstop Studios/Unity Helpers/Texture Settings Applier")]
|
|
46
46
|
public static void CreateAnimation()
|
|
47
47
|
{
|
|
48
48
|
_ = DisplayWizard<TextureSettingsApplier>("Texture Settings Directory Applier", "Set");
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
using System.Reflection;
|
|
5
5
|
using UnityEditor;
|
|
6
6
|
using UnityEngine;
|
|
7
|
-
using
|
|
8
|
-
using
|
|
7
|
+
using Core.Attributes;
|
|
8
|
+
using Core.Extension;
|
|
9
9
|
|
|
10
10
|
[CustomPropertyDrawer(typeof(WShowIfAttribute))]
|
|
11
11
|
public sealed class WShowIfPropertyDrawer : PropertyDrawer
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Core.Attributes
|
|
2
|
+
{
|
|
3
|
+
using System;
|
|
4
|
+
|
|
5
|
+
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
|
6
|
+
public sealed class EnumDisplayNameAttribute : Attribute
|
|
7
|
+
{
|
|
8
|
+
public string DisplayName { get; }
|
|
9
|
+
|
|
10
|
+
public EnumDisplayNameAttribute(string displayName)
|
|
11
|
+
{
|
|
12
|
+
DisplayName = displayName;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,158 @@
|
|
|
1
|
-
|
|
1
|
+
// ReSharper disable StaticMemberInGenericType
|
|
2
|
+
namespace WallstopStudios.UnityHelpers.Core.Extension
|
|
2
3
|
{
|
|
3
4
|
using System;
|
|
5
|
+
using System.Collections.Generic;
|
|
6
|
+
using System.Linq;
|
|
7
|
+
using System.Reflection;
|
|
4
8
|
using System.Runtime.CompilerServices;
|
|
9
|
+
using Attributes;
|
|
10
|
+
using Helper;
|
|
11
|
+
|
|
12
|
+
public static class EnumNameCache<T>
|
|
13
|
+
where T : struct, Enum
|
|
14
|
+
{
|
|
15
|
+
private const int MaxDenseRange = 1024;
|
|
16
|
+
|
|
17
|
+
private static readonly bool UseDensePacking;
|
|
18
|
+
private static readonly int Min;
|
|
19
|
+
private static readonly string[]? DenseNames;
|
|
20
|
+
private static readonly Dictionary<int, string>? SparseNames;
|
|
21
|
+
|
|
22
|
+
static EnumNameCache()
|
|
23
|
+
{
|
|
24
|
+
T[] values = Enum.GetValues(typeof(T)).Cast<T>().ToArray();
|
|
25
|
+
int[] intValues = values.Select(v => Unsafe.As<T, int>(ref v)).ToArray();
|
|
26
|
+
int min = intValues.Min();
|
|
27
|
+
int max = intValues.Max();
|
|
28
|
+
int range = max - min + 1;
|
|
29
|
+
|
|
30
|
+
if (range <= MaxDenseRange)
|
|
31
|
+
{
|
|
32
|
+
UseDensePacking = true;
|
|
33
|
+
Min = min;
|
|
34
|
+
DenseNames = new string[range];
|
|
35
|
+
|
|
36
|
+
for (int i = 0; i < values.Length; i++)
|
|
37
|
+
{
|
|
38
|
+
int key = intValues[i] - min;
|
|
39
|
+
T value = values[i];
|
|
40
|
+
DenseNames[key] = value.ToString("G");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else
|
|
44
|
+
{
|
|
45
|
+
UseDensePacking = false;
|
|
46
|
+
SparseNames = new Dictionary<int, string>();
|
|
47
|
+
for (int i = 0; i < values.Length; i++)
|
|
48
|
+
{
|
|
49
|
+
int key = Unsafe.As<T, int>(ref values[i]);
|
|
50
|
+
T value = values[i];
|
|
51
|
+
string name = value.ToString("G");
|
|
52
|
+
SparseNames.TryAdd(key, name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
58
|
+
public static string ToCachedName(T value)
|
|
59
|
+
{
|
|
60
|
+
int key = Unsafe.As<T, int>(ref value);
|
|
61
|
+
if (UseDensePacking)
|
|
62
|
+
{
|
|
63
|
+
int idx = key - Min;
|
|
64
|
+
if ((uint)idx < (uint)DenseNames!.Length)
|
|
65
|
+
{
|
|
66
|
+
return DenseNames[idx];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
{
|
|
71
|
+
if (SparseNames!.TryGetValue(key, out string name))
|
|
72
|
+
{
|
|
73
|
+
return name;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return value.ToString();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
public static class EnumDisplayNameCache<T>
|
|
82
|
+
where T : struct, Enum
|
|
83
|
+
{
|
|
84
|
+
private const int MaxDenseRange = 1024;
|
|
85
|
+
|
|
86
|
+
private static readonly bool UseDensePacking;
|
|
87
|
+
private static readonly int Min;
|
|
88
|
+
private static readonly string[]? DenseNames;
|
|
89
|
+
private static readonly Dictionary<int, string>? SparseNames;
|
|
90
|
+
|
|
91
|
+
static EnumDisplayNameCache()
|
|
92
|
+
{
|
|
93
|
+
Type type = typeof(T);
|
|
94
|
+
FieldInfo[] fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
|
|
95
|
+
T[] values = fields.Select(f => (T)f.GetValue(null)).ToArray();
|
|
96
|
+
int[] intValues = values.Select(v => Unsafe.As<T, int>(ref v)).ToArray();
|
|
97
|
+
int min = intValues.Min();
|
|
98
|
+
int max = intValues.Max();
|
|
99
|
+
int range = max - min + 1;
|
|
100
|
+
|
|
101
|
+
if (range <= MaxDenseRange)
|
|
102
|
+
{
|
|
103
|
+
UseDensePacking = true;
|
|
104
|
+
Min = min;
|
|
105
|
+
DenseNames = new string[range];
|
|
106
|
+
|
|
107
|
+
for (int i = 0; i < fields.Length; i++)
|
|
108
|
+
{
|
|
109
|
+
int key = intValues[i] - min;
|
|
110
|
+
FieldInfo field = fields[i];
|
|
111
|
+
string name = field.IsAttributeDefined(out EnumDisplayNameAttribute displayName)
|
|
112
|
+
? displayName.DisplayName
|
|
113
|
+
: field.Name;
|
|
114
|
+
DenseNames[key] = name;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
{
|
|
119
|
+
UseDensePacking = false;
|
|
120
|
+
SparseNames = new Dictionary<int, string>();
|
|
121
|
+
for (int i = 0; i < fields.Length; i++)
|
|
122
|
+
{
|
|
123
|
+
int key = Unsafe.As<T, int>(ref values[i]);
|
|
124
|
+
FieldInfo field = fields[i];
|
|
125
|
+
string name = field.IsAttributeDefined(out EnumDisplayNameAttribute displayName)
|
|
126
|
+
? displayName.DisplayName
|
|
127
|
+
: field.Name;
|
|
128
|
+
SparseNames.TryAdd(key, name);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
134
|
+
public static string ToDisplayName(T value)
|
|
135
|
+
{
|
|
136
|
+
int key = Unsafe.As<T, int>(ref value);
|
|
137
|
+
if (UseDensePacking)
|
|
138
|
+
{
|
|
139
|
+
int idx = key - Min;
|
|
140
|
+
if ((uint)idx < (uint)DenseNames!.Length)
|
|
141
|
+
{
|
|
142
|
+
return DenseNames[idx];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else
|
|
146
|
+
{
|
|
147
|
+
if (SparseNames!.TryGetValue(key, out string name))
|
|
148
|
+
{
|
|
149
|
+
return name;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return value.ToString();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
5
156
|
|
|
6
157
|
public static class EnumExtensions
|
|
7
158
|
{
|
|
@@ -14,6 +165,30 @@
|
|
|
14
165
|
return (valueUnderlying & flagUnderlying) == flagUnderlying;
|
|
15
166
|
}
|
|
16
167
|
|
|
168
|
+
public static string ToDisplayName<T>(this T value)
|
|
169
|
+
where T : unmanaged, Enum
|
|
170
|
+
{
|
|
171
|
+
return EnumDisplayNameCache<T>.ToDisplayName(value);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
public static IEnumerable<string> ToDisplayNames<T>(this IEnumerable<T> enumerable)
|
|
175
|
+
where T : unmanaged, Enum
|
|
176
|
+
{
|
|
177
|
+
return enumerable.Select(value => value.ToDisplayName());
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
public static string ToCachedName<T>(this T value)
|
|
181
|
+
where T : unmanaged, Enum
|
|
182
|
+
{
|
|
183
|
+
return EnumNameCache<T>.ToCachedName(value);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
public static IEnumerable<string> ToCachedNames<T>(this IEnumerable<T> enumerable)
|
|
187
|
+
where T : unmanaged, Enum
|
|
188
|
+
{
|
|
189
|
+
return enumerable.Select(value => value.ToCachedName());
|
|
190
|
+
}
|
|
191
|
+
|
|
17
192
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
18
193
|
private static unsafe ulong GetUInt64<T>(T value)
|
|
19
194
|
where T : unmanaged
|
|
@@ -74,9 +74,8 @@
|
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
: null;
|
|
77
|
+
EffectHandler effectHandler = target.GetGameObject().GetOrAddComponent<EffectHandler>();
|
|
78
|
+
return effectHandler.ApplyEffect(attributeEffect);
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
public static void ApplyEffectsNoAlloc(
|
|
@@ -89,11 +88,11 @@
|
|
|
89
88
|
return;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
|
-
if (target == null
|
|
91
|
+
if (target == null)
|
|
93
92
|
{
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
96
|
-
|
|
95
|
+
EffectHandler effectHandler = target.GetGameObject().GetOrAddComponent<EffectHandler>();
|
|
97
96
|
foreach (AttributeEffect attributeEffect in attributeEffects)
|
|
98
97
|
{
|
|
99
98
|
_ = effectHandler.ApplyEffect(attributeEffect);
|
|
@@ -105,11 +104,12 @@
|
|
|
105
104
|
IEnumerable<AttributeEffect> attributeEffects
|
|
106
105
|
)
|
|
107
106
|
{
|
|
108
|
-
if (target == null
|
|
107
|
+
if (target == null)
|
|
109
108
|
{
|
|
110
109
|
return;
|
|
111
110
|
}
|
|
112
111
|
|
|
112
|
+
EffectHandler effectHandler = target.GetGameObject().GetOrAddComponent<EffectHandler>();
|
|
113
113
|
foreach (AttributeEffect attributeEffect in attributeEffects)
|
|
114
114
|
{
|
|
115
115
|
_ = effectHandler.ApplyEffect(attributeEffect);
|
|
@@ -122,11 +122,12 @@
|
|
|
122
122
|
List<EffectHandle> effectHandles
|
|
123
123
|
)
|
|
124
124
|
{
|
|
125
|
-
if (target == null
|
|
125
|
+
if (target == null)
|
|
126
126
|
{
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
EffectHandler effectHandler = target.GetGameObject().GetOrAddComponent<EffectHandler>();
|
|
130
131
|
foreach (AttributeEffect attributeEffect in attributeEffects)
|
|
131
132
|
{
|
|
132
133
|
EffectHandle? handle = effectHandler.ApplyEffect(attributeEffect);
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
using Utils;
|
|
11
11
|
|
|
12
12
|
[DisallowMultipleComponent]
|
|
13
|
+
[RequireComponent(typeof(TagHandler))]
|
|
13
14
|
public sealed class EffectHandler : MonoBehaviour
|
|
14
15
|
{
|
|
15
|
-
[SiblingComponent(
|
|
16
|
+
[SiblingComponent()]
|
|
16
17
|
private TagHandler _tagHandler;
|
|
17
18
|
|
|
18
19
|
[SiblingComponent(optional = true)]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.DataStructures
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class BalancedKDTreeTests : SpatialTreeTests<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
using System;
|
|
4
4
|
using System.Collections.Generic;
|
|
5
5
|
using System.Linq;
|
|
6
|
+
using Core.DataStructure;
|
|
6
7
|
using NUnit.Framework;
|
|
7
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
8
8
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
9
9
|
|
|
10
10
|
public sealed class CyclicBufferTests
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.DataStructures
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class QuadTreeTests : SpatialTreeTests<QuadTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.DataStructures
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class UnbalancedKDTreeTests : SpatialTreeTests<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Extensions
|
|
2
2
|
{
|
|
3
|
+
using Core.Extension;
|
|
3
4
|
using NUnit.Framework;
|
|
4
5
|
using UnityEngine.TestTools.Constraints;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
6
6
|
using Is = NUnit.Framework.Is;
|
|
7
7
|
|
|
8
8
|
public sealed class EnumExtensionTests
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
using System;
|
|
4
4
|
using System.Collections.Generic;
|
|
5
5
|
using System.Linq;
|
|
6
|
+
using Core.Extension;
|
|
6
7
|
using NUnit.Framework;
|
|
7
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
8
8
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
9
9
|
|
|
10
10
|
public sealed class IListExtensionTests
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
using System;
|
|
4
4
|
using System.Collections.Generic;
|
|
5
5
|
using System.Linq;
|
|
6
|
+
using Core.Extension;
|
|
6
7
|
using NUnit.Framework;
|
|
7
8
|
using UnityEngine;
|
|
8
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
9
9
|
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
10
10
|
using WallstopStudios.UnityHelpers.Core.Helper.Logging;
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Extensions
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.Extension;
|
|
4
5
|
using NUnit.Framework;
|
|
5
6
|
using UnityEngine;
|
|
6
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
7
7
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
8
8
|
|
|
9
9
|
public sealed class RandomExtensionTests
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Helper
|
|
2
2
|
{
|
|
3
|
+
using Core.Extension;
|
|
3
4
|
using NUnit.Framework;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
6
6
|
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
7
7
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class KDTreePerformanceTests : SpatialTreePerformanceTest<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class QuadTreePerformanceTests : SpatialTreePerformanceTest<QuadTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
using System.Diagnostics;
|
|
7
7
|
using System.Linq;
|
|
8
8
|
using System.Threading.Tasks;
|
|
9
|
+
using Core.DataStructure;
|
|
9
10
|
using NUnit.Framework;
|
|
10
11
|
using UnityEngine;
|
|
11
12
|
using UnityEngine.TestTools;
|
|
12
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
13
13
|
|
|
14
14
|
public abstract class SpatialTreePerformanceTest<TTree>
|
|
15
15
|
where TTree : ISpatialTree<Vector2>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using Core.DataStructure;
|
|
4
5
|
using UnityEngine;
|
|
5
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class UnbalancedKDTreeTests : SpatialTreePerformanceTest<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
using System.Collections.Generic;
|
|
5
5
|
using System.Linq;
|
|
6
6
|
using System.Runtime.CompilerServices;
|
|
7
|
+
using Core.DataStructure.Adapters;
|
|
8
|
+
using Core.Extension;
|
|
7
9
|
using NUnit.Framework;
|
|
8
|
-
using WallstopStudios.UnityHelpers.Core.DataStructure.Adapters;
|
|
9
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
10
10
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
11
11
|
using WallstopStudios.UnityHelpers.Core.Serialization;
|
|
12
12
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
using System.Linq;
|
|
6
6
|
using System.Runtime.Serialization;
|
|
7
7
|
using System.Text.Json.Serialization;
|
|
8
|
+
using Core.Extension;
|
|
8
9
|
using NUnit.Framework;
|
|
9
10
|
using UnityEngine;
|
|
10
|
-
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
11
11
|
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
12
12
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
13
13
|
using WallstopStudios.UnityHelpers.Core.Serialization;
|