com.wallstop-studios.unity-helpers 2.1.1 → 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.
- package/AGENTS.md +1 -0
- package/Docs/ILIST_SORTING_PERFORMANCE.md +16 -16
- package/Docs/INDEX.md +1 -0
- package/Docs/RANDOM_PERFORMANCE.md +15 -15
- package/Docs/REFLECTION_HELPERS.md +84 -1
- package/Docs/REFLECTION_PERFORMANCE.md +169 -0
- package/{package-lock.json.meta → Docs/REFLECTION_PERFORMANCE.md.meta} +1 -1
- package/Docs/RELATIONAL_COMPONENTS.md +6 -0
- package/Docs/RELATIONAL_COMPONENT_PERFORMANCE.md +63 -0
- package/Docs/RELATIONAL_COMPONENT_PERFORMANCE.md.meta +7 -0
- package/Docs/SPATIAL_TREE_2D_PERFORMANCE.md +64 -64
- package/Docs/SPATIAL_TREE_3D_PERFORMANCE.md +64 -64
- package/Editor/Sprites/AnimationCopier.cs +1 -1
- package/Editor/Sprites/AnimationViewerWindow.cs +4 -4
- package/Editor/Sprites/SpriteSettingsApplierAPI.cs +2 -1
- package/Editor/Sprites/TextureResizerWizard.cs +4 -3
- package/Editor/Utils/ScriptableObjectSingletonCreator.cs +3 -3
- package/README.md +8 -3
- package/Runtime/Core/Attributes/BaseRelationalComponentAttribute.cs +147 -20
- package/Runtime/Core/Attributes/ChildComponentAttribute.cs +630 -117
- package/Runtime/Core/Attributes/NotNullAttribute.cs +5 -2
- package/Runtime/Core/Attributes/ParentComponentAttribute.cs +477 -103
- package/Runtime/Core/Attributes/RelationalComponentAssigner.cs +26 -3
- package/Runtime/Core/Attributes/RelationalComponentExtensions.cs +19 -3
- package/Runtime/Core/Attributes/SiblingComponentAttribute.cs +265 -92
- package/Runtime/Core/CodeGen.meta +8 -0
- package/Runtime/Core/DataStructure/ImmutableBitSet.cs +5 -20
- package/Runtime/Core/Helper/Helpers.cs +8 -0
- package/Runtime/Core/Helper/Logging/UnityLogTagFormatter.cs +11 -7
- package/Runtime/Core/Helper/Objects.cs +1 -1
- package/Runtime/Core/Helper/ReflectionHelpers.Factory.cs +5142 -0
- package/Runtime/Core/Helper/ReflectionHelpers.Factory.cs.meta +11 -0
- package/Runtime/Core/Helper/ReflectionHelpers.cs +1812 -1518
- package/Runtime/Core/Math/Line2D.cs +2 -4
- package/Runtime/Core/Math/Line3D.cs +2 -4
- package/Runtime/Core/Random/FlurryBurstRandom.cs +0 -6
- package/Runtime/Tags/AttributeMetadataCache.cs +4 -6
- package/Runtime/Tags/CosmeticEffectData.cs +1 -1
- package/Runtime/Visuals/UIToolkit/MultiFileSelectorElement.cs +3 -3
- package/Tests/Editor/Helper/HelpersTests.cs +2 -2
- package/Tests/Editor/Helper/ReflectionHelpersTypedEditorTests.cs +87 -0
- package/Tests/Editor/Helper/ReflectionHelpersTypedEditorTests.cs.meta +11 -0
- package/Tests/Editor/Helper/SpriteHelpersTests.cs +1 -1
- package/Tests/Editor/PrefabCheckerReportTests.cs +3 -3
- package/Tests/Editor/Sprites/AnimationCopierFilterTests.cs +18 -12
- package/Tests/Editor/Sprites/AnimationCopierWindowTests.cs +8 -7
- package/Tests/Editor/Sprites/AnimationViewerWindowTests.cs +2 -1
- package/Tests/Editor/Sprites/ScriptableSpriteAtlasEditorTests.cs +6 -5
- package/Tests/Editor/Sprites/SpriteCropperAdditionalTests.cs +2 -1
- package/Tests/Editor/Sprites/SpriteCropperTests.cs +7 -6
- package/Tests/Editor/Sprites/SpritePivotAdjusterAdditionalTests.cs +2 -1
- package/Tests/Editor/Sprites/SpritePivotAdjusterTests.cs +4 -3
- package/Tests/Editor/Sprites/TextureResizerWizardTests.cs +10 -9
- package/Tests/Editor/Sprites/TextureSettingsApplierAPITests.cs +2 -1
- package/Tests/Runtime/Helper/ObjectsTests.cs +1 -1
- package/Tests/Runtime/Helper/ReflectionHelperCapabilityMatrixTests.cs +2923 -0
- package/Tests/Runtime/Helper/ReflectionHelperCapabilityMatrixTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/ReflectionHelperTests.cs +660 -0
- package/Tests/Runtime/Performance/ReflectionPerformanceTests.cs +1238 -0
- package/Tests/Runtime/Performance/ReflectionPerformanceTests.cs.meta +11 -0
- package/Tests/Runtime/Performance/RelationalComponentBenchmarkTests.cs +832 -0
- package/Tests/Runtime/Performance/RelationalComponentBenchmarkTests.cs.meta +11 -0
- package/package.json +1 -1
- package/Tests/Runtime/Performance/RelationComponentPerformanceTests.cs +0 -60
- package/Tests/Runtime/Performance/RelationComponentPerformanceTests.cs.meta +0 -3
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
|
-
{
|
|
3
|
-
using System;
|
|
4
|
-
using System.Diagnostics;
|
|
5
|
-
using NUnit.Framework;
|
|
6
|
-
using UnityEngine;
|
|
7
|
-
using WallstopStudios.UnityHelpers.Core.Attributes;
|
|
8
|
-
using WallstopStudios.UnityHelpers.Tests.Attributes.Components;
|
|
9
|
-
|
|
10
|
-
public sealed class RelationComponentPerformanceTests
|
|
11
|
-
{
|
|
12
|
-
[Test]
|
|
13
|
-
public void RelationalPerformanceComplexTest()
|
|
14
|
-
{
|
|
15
|
-
int count = 0;
|
|
16
|
-
|
|
17
|
-
GameObject go = new("Test", typeof(RelationalComponentTesterComplex));
|
|
18
|
-
RelationalComponentTesterComplex tester =
|
|
19
|
-
go.GetComponent<RelationalComponentTesterComplex>();
|
|
20
|
-
// Pre-warm
|
|
21
|
-
tester.AssignRelationalComponents();
|
|
22
|
-
|
|
23
|
-
TimeSpan timeout = TimeSpan.FromSeconds(10);
|
|
24
|
-
Stopwatch timer = Stopwatch.StartNew();
|
|
25
|
-
do
|
|
26
|
-
{
|
|
27
|
-
tester.AssignRelationalComponents();
|
|
28
|
-
++count;
|
|
29
|
-
} while (timer.Elapsed < timeout);
|
|
30
|
-
|
|
31
|
-
UnityEngine.Debug.Log($"Averaged {count / timeout.TotalSeconds} operations / second.");
|
|
32
|
-
|
|
33
|
-
Assert.AreNotEqual(0, tester._childColliders.Length);
|
|
34
|
-
Assert.AreNotEqual(0, tester._parentColliders.Length);
|
|
35
|
-
Assert.AreNotEqual(0, tester._siblingColliders.Length);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
[Test]
|
|
39
|
-
public void RelationalPerformanceSimpleTest()
|
|
40
|
-
{
|
|
41
|
-
int count = 0;
|
|
42
|
-
|
|
43
|
-
GameObject go = new("Test", typeof(RelationalComponentTesterSimple));
|
|
44
|
-
RelationalComponentTesterSimple tester =
|
|
45
|
-
go.GetComponent<RelationalComponentTesterSimple>();
|
|
46
|
-
// Pre-warm
|
|
47
|
-
tester.AssignRelationalComponents();
|
|
48
|
-
|
|
49
|
-
TimeSpan timeout = TimeSpan.FromSeconds(10);
|
|
50
|
-
Stopwatch timer = Stopwatch.StartNew();
|
|
51
|
-
do
|
|
52
|
-
{
|
|
53
|
-
tester.AssignRelationalComponents();
|
|
54
|
-
++count;
|
|
55
|
-
} while (timer.Elapsed < timeout);
|
|
56
|
-
|
|
57
|
-
UnityEngine.Debug.Log($"Averaged {count / timeout.TotalSeconds} operations / second.");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|