com.wallstop-studios.unity-helpers 2.0.0-rc81.9 → 2.0.0
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/.editorconfig +1 -1
- package/.gitattributes +1 -1
- package/.githooks/pre-commit +31 -5
- package/.githooks/pre-push +50 -0
- package/.github/dependabot.yml +24 -2
- package/.github/scripts/check-markdown-links.ps1 +77 -0
- package/.github/scripts/check_markdown_links.py +89 -0
- package/.github/scripts/check_markdown_url_encoding.py +74 -0
- package/.github/scripts/validate_markdown_links.py +194 -0
- package/.github/workflows/csharpier-autofix.yml +152 -0
- package/.github/workflows/format-on-demand.yml +305 -0
- package/.github/workflows/lint-doc-links.yml +8 -5
- package/.github/workflows/markdown-json.yml +6 -2
- package/.github/workflows/prettier-autofix.yml +195 -0
- package/.github/workflows/update-dotnet-tools.yml +80 -0
- package/.github/workflows/yaml-format-lint.yml +41 -0
- package/.lychee.toml +4 -4
- package/.markdownlint.jsonc +21 -0
- package/.pre-commit-config.yaml +11 -3
- package/.yamllint.yaml +31 -0
- package/AGENTS.md +5 -1
- package/CHANGELOG.md +11 -0
- package/CONTRIBUTING.md +49 -0
- package/CONTRIBUTING.md.meta +7 -0
- package/EDITOR_TOOLS_GUIDE.md +4 -0
- package/Editor/AnimationEventEditor.cs +337 -160
- package/Editor/Core/Helper/AnimationEventHelpers.cs +178 -152
- package/Editor/CustomEditors/PersistentDirectoryGUI.cs +20 -11
- package/Editor/CustomEditors/TexturePlatformOverrideEntryDrawer.cs +11 -2
- package/Editor/FitTextureSizeWindow.cs +43 -19
- package/Editor/PersistentDirectorySettings.cs +64 -12
- package/Editor/PrefabChecker.cs +72 -5
- package/Editor/Sprites/AnimationCopier.cs +132 -56
- package/Editor/Sprites/AnimationCreator.cs +63 -22
- package/Editor/Sprites/AnimationViewerWindow.cs +42 -6
- package/Editor/Sprites/TexturePlatformNameHelper.cs +50 -39
- package/Editor/Sprites/TextureResizerWizard.cs +23 -1
- package/Editor/Sprites/TextureSettingsApplierWindow.cs +148 -85
- package/Editor/Tools/ImageBlurTool.cs +81 -10
- package/Editor/Utils/EditorUi.cs +1 -1
- package/Editor/Utils/ScriptableObjectSingletonCreator.cs +1 -1
- package/GETTING_STARTED.md +40 -56
- package/RANDOM_PERFORMANCE.md +12 -12
- package/README.md +395 -2407
- package/RELATIONAL_COMPONENTS.md +92 -83
- package/Runtime/AssemblyInfo.cs +2 -0
- package/Runtime/Core/Attributes/NotNullAttribute.cs +1 -3
- package/Runtime/Core/Attributes/RelationalComponentAssigner.cs +50 -5
- package/Runtime/Core/DataStructure/CyclicBuffer.cs +0 -1
- package/Runtime/Core/Extension/RandomExtensions.cs +68 -0
- package/Runtime/Core/Extension/WallstopStudiosLogger.cs +16 -0
- package/Runtime/Core/Helper/Partials/ObjectHelpers.cs +4 -1
- package/Runtime/Core/Helper/ReflectionHelpers.cs +21 -10
- package/Runtime/Core/Helper/SpriteHelpers.cs +3 -1
- package/Runtime/Core/Helper/UnityMainThreadDispatcher.cs +45 -1
- package/Runtime/Core/Serialization/JsonConverters/GameObjectConverter.cs +13 -5
- package/Runtime/Core/Serialization/JsonConverters/ResolutionConverter.cs +1 -1
- package/Runtime/Core/Serialization/JsonConverters/TypeConverter.cs +1 -1
- package/Runtime/Core/Serialization/Serializer.cs +101 -0
- package/Runtime/Integrations/VContainer/AssemblyInfo.cs +9 -0
- package/Runtime/Integrations/VContainer/AssemblyInfo.cs.meta +3 -0
- package/Runtime/Integrations/VContainer/ObjectResolverRelationalExtensions.cs +96 -0
- package/Runtime/Integrations/VContainer/RelationalComponentEntryPoint.cs +90 -10
- package/Runtime/Integrations/VContainer/RelationalComponentsBuilderExtensions.cs +13 -1
- package/Runtime/Integrations/VContainer/RelationalObjectPools.cs +114 -0
- package/Runtime/Integrations/VContainer/RelationalObjectPools.cs.meta +11 -0
- package/Runtime/Integrations/VContainer/RelationalSceneAssignmentOptions.cs +16 -4
- package/Runtime/Integrations/VContainer/RelationalSceneLoadListener.cs +241 -0
- package/Runtime/Integrations/VContainer/RelationalSceneLoadListener.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/AssemblyInfo.cs +9 -0
- package/Runtime/Integrations/Zenject/AssemblyInfo.cs.meta +3 -0
- package/Runtime/Integrations/Zenject/DiContainerRelationalExtensions.cs +69 -2
- package/Runtime/Integrations/Zenject/RelationalComponentSceneInitializer.cs +89 -12
- package/Runtime/Integrations/Zenject/RelationalComponentsInstaller.cs +23 -1
- package/Runtime/Integrations/Zenject/RelationalMemoryPools.cs +44 -0
- package/Runtime/Integrations/Zenject/RelationalMemoryPools.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/RelationalSceneAssignmentOptions.cs +16 -10
- package/Runtime/Integrations/Zenject/RelationalSceneLoadListener.cs +243 -0
- package/Runtime/Integrations/Zenject/RelationalSceneLoadListener.cs.meta +11 -0
- package/Runtime/Tags/AttributeMetadataCache.cs +1 -4
- package/Runtime/Utils/Buffers.cs +4 -4
- package/Runtime/Utils/ScriptableObjectSingleton.cs +0 -1
- package/Runtime/Utils/SetTextureImportData.cs +3 -1
- package/Runtime/Utils/TextureScale.cs +10 -2
- package/Runtime/Visuals/UGUI/EnhancedImage.cs +6 -0
- package/Runtime/Visuals/UIToolkit/LayeredImage.cs +4 -1
- package/SERIALIZATION.md +15 -0
- package/SPATIAL_TREE_2D_PERFORMANCE.md +85 -82
- package/SPATIAL_TREE_3D_PERFORMANCE.md +94 -91
- package/Samples~/DI - VContainer/README.md +232 -51
- package/Samples~/DI - VContainer/Scripts/GameLifetimeScope.cs +22 -4
- package/Samples~/DI - VContainer/Scripts/RelationalConsumer.cs +5 -2
- package/Samples~/DI - VContainer/Scripts/Spawner.cs +113 -4
- package/Samples~/DI - Zenject/README.md +217 -53
- package/Samples~/DI - Zenject/Scripts/RelationalConsumer.cs +3 -0
- package/Samples~/DI - Zenject/Scripts/RelationalConsumerPool.cs +37 -0
- package/Samples~/DI - Zenject/Scripts/RelationalConsumerPool.cs.meta +12 -0
- package/Samples~/DI - Zenject/Scripts/SpawnerZenject.cs +74 -3
- package/Samples~/Random - PRNG/README.md +2 -1
- package/Samples~/Relational Components - Basic/README.md +3 -1
- package/Samples~/Serialization - JSON/README.md +2 -1
- package/Samples~/Spatial Structures - 2D and 3D/README.md +2 -1
- package/Samples~/UGUI - EnhancedImage/README.md +2 -1
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/README.md +2 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/Tests/Editor/Attributes/AnimationEventHelpersTests.cs +16 -0
- package/Tests/Editor/Core/Attributes/RelationalComponentAssignerTests.cs +3 -3
- package/Tests/Editor/Integrations/VContainer/VContainerRelationalEntryPointTests.cs +6 -2
- package/Tests/Editor/Integrations/VContainer/VContainerRelationalHelpersTests.cs +170 -0
- package/Tests/Editor/Integrations/VContainer/VContainerRelationalHelpersTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Editor.VContainer.asmdef +2 -1
- package/Tests/Editor/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Editor.Zenject.asmdef +3 -2
- package/Tests/Editor/Integrations/Zenject/ZenjectRelationalHelpersTests.cs +131 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectRelationalHelpersTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectRelationalInitializerTests.cs +6 -2
- package/Tests/Editor/PersistentDirectorySettingsTests.cs +59 -0
- package/Tests/Editor/PersistentDirectorySettingsTests.cs.meta +11 -0
- package/Tests/Editor/PrefabCheckerReportTests.cs +32 -0
- package/Tests/Editor/PrefabCheckerReportTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/AnimationCopierFilterTests.cs +64 -0
- package/Tests/Editor/Sprites/AnimationCopierFilterTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/AnimationCopierWindowTests.cs +1 -1
- package/Tests/Editor/Sprites/AnimationViewerWindowTests.cs +38 -0
- package/Tests/Editor/Sprites/AnimationViewerWindowTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/ScriptableSpriteAtlasEditorTests.cs +1 -1
- package/Tests/Editor/Sprites/SpriteCropperAdditionalTests.cs +12 -12
- package/Tests/Editor/Sprites/SpriteCropperTests.cs +9 -9
- package/Tests/Editor/Sprites/SpritePivotAdjusterTests.cs +3 -3
- package/Tests/Editor/Sprites/TexturePlatformNameHelperTests.cs +18 -0
- package/Tests/Editor/Sprites/TextureResizerWizardTests.cs +5 -5
- package/Tests/Editor/Sprites/TextureSettingsApplierAPITests.cs +3 -3
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardAdditionalTests.cs +4 -4
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardTests.cs +4 -4
- package/Tests/Editor/Tools/ImageBlurToolTests.cs +22 -110
- package/Tests/Editor/Utils/CommonTestBase.cs +43 -1
- package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorTests.cs +5 -5
- package/Tests/Editor/Windows/FitTextureSizeWindowTests.cs +66 -74
- package/Tests/Runtime/Attributes/RelationalComponentInitializerTests.cs +4 -15
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsConsistencyTests.cs +29 -29
- package/Tests/Runtime/Integrations/VContainer/RelationalComponentsVContainerTests.cs +259 -218
- package/Tests/Runtime/Integrations/VContainer/RelationalObjectPoolsVContainerTests.cs +86 -0
- package/Tests/Runtime/Integrations/VContainer/RelationalObjectPoolsVContainerTests.cs.meta +11 -0
- package/Tests/Runtime/Integrations/Zenject/RelationalComponentsZenjectTests.cs +255 -227
- package/Tests/Runtime/Performance/SpatialTree2DPerformanceTests.cs +5 -0
- package/Tests/Runtime/Performance/SpatialTree3DPerformanceTests.cs +3 -0
- package/Tests/Runtime/Serialization/JsonConverterAdditionalTests.cs +30 -0
- package/Tests/Runtime/Serialization/JsonConverterAdditionalTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/JsonConverterTests.cs +8 -12
- package/Tests/Runtime/Serialization/JsonSerializationTest.cs +16 -5
- package/Tests/Runtime/Serialization/SerializerAdditionalTests.cs +12 -0
- package/Tests/Runtime/Serialization/SerializerFileIoTests.cs +105 -0
- package/Tests/Runtime/Serialization/SerializerFileIoTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/UnityEngineObjectJsonTests.cs +247 -0
- package/Tests/Runtime/Serialization/UnityEngineObjectJsonTests.cs.meta +11 -0
- package/Tests/Runtime/TestUtils/CommonTestBase.cs +88 -0
- package/Tests/Runtime/Utils/CoroutineHandlerTests.cs +1 -1
- package/Tests/Runtime/Utils/LZMAComprehensiveTests.cs +1 -1
- package/Tests/Runtime/Utils/LZMATests.cs +1 -1
- package/Tests/Runtime/Utils/MatchColliderToSpriteTests.cs +1 -1
- package/Tests/Runtime/Visuals/EnhancedImageTests.cs +25 -56
- package/Tests/Runtime/Visuals/VisualsTestHelpers.cs +1 -8
- package/package-lock.json.meta +7 -0
- package/package.json +8 -4
- package/scripts/check-eol.ps1 +4 -5
- package/scripts/lint-tests.ps1 +156 -0
- package/scripts/lint-tests.ps1.meta +7 -0
- package/scripts/normalize-eol.ps1 +6 -9
- package/.github/workflows/csharpier.yml +0 -135
|
@@ -67,7 +67,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Utils
|
|
|
67
67
|
// Assert: no duplicate folder created and asset placed in reused folder
|
|
68
68
|
Assert.IsTrue(AssetDatabase.IsValidFolder("Assets/Resources/cASEtest"));
|
|
69
69
|
Assert.IsFalse(AssetDatabase.IsValidFolder("Assets/Resources/CaseTest 1"));
|
|
70
|
-
Assert.
|
|
70
|
+
Assert.IsTrue(AssetDatabase.LoadAssetAtPath<Object>(assetPath) != null);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
[UnityTest]
|
|
@@ -89,8 +89,8 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Utils
|
|
|
89
89
|
yield return null;
|
|
90
90
|
|
|
91
91
|
// Assert: no duplicate asset created alongside
|
|
92
|
-
Assert.
|
|
93
|
-
AssetDatabase.LoadAssetAtPath<Object>(targetFolder + "/Duplicate 1.asset")
|
|
92
|
+
Assert.IsTrue(
|
|
93
|
+
AssetDatabase.LoadAssetAtPath<Object>(targetFolder + "/Duplicate 1.asset") == null
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -106,10 +106,10 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Utils
|
|
|
106
106
|
yield return null;
|
|
107
107
|
|
|
108
108
|
// Assert: no asset created at the ambiguous path
|
|
109
|
-
Assert.
|
|
109
|
+
Assert.IsTrue(
|
|
110
110
|
AssetDatabase.LoadAssetAtPath<Object>(
|
|
111
111
|
"Assets/Resources/CreatorTests/Collision/NameCollision.asset"
|
|
112
|
-
)
|
|
112
|
+
) == null
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -34,7 +34,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
34
34
|
AssetDatabase.Refresh();
|
|
35
35
|
|
|
36
36
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
37
|
-
Assert.
|
|
37
|
+
Assert.IsTrue(imp != null, "Importer should exist");
|
|
38
38
|
imp.maxTextureSize = 128;
|
|
39
39
|
imp.SaveAndReimport();
|
|
40
40
|
|
|
@@ -42,16 +42,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
42
42
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
43
43
|
);
|
|
44
44
|
window._fitMode = FitMode.GrowOnly;
|
|
45
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
45
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
46
46
|
{
|
|
47
|
-
AssetDatabase.LoadAssetAtPath<
|
|
47
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
int count = window.CalculateTextureChanges(true);
|
|
51
51
|
Assert.That(count, Is.GreaterThanOrEqualTo(1), "Expected at least one change");
|
|
52
52
|
|
|
53
53
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
54
|
-
Assert.
|
|
54
|
+
Assert.IsTrue(imp != null);
|
|
55
55
|
Assert.That(
|
|
56
56
|
imp.maxTextureSize,
|
|
57
57
|
Is.EqualTo(512),
|
|
@@ -67,7 +67,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
67
67
|
AssetDatabase.Refresh();
|
|
68
68
|
|
|
69
69
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
70
|
-
Assert.
|
|
70
|
+
Assert.IsTrue(imp != null, "Importer should exist");
|
|
71
71
|
imp.maxTextureSize = 2048;
|
|
72
72
|
imp.SaveAndReimport();
|
|
73
73
|
|
|
@@ -75,16 +75,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
75
75
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
76
76
|
);
|
|
77
77
|
window._fitMode = FitMode.ShrinkOnly;
|
|
78
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
78
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
79
79
|
{
|
|
80
|
-
AssetDatabase.LoadAssetAtPath<
|
|
80
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
int count = window.CalculateTextureChanges(true);
|
|
84
84
|
Assert.That(count, Is.GreaterThanOrEqualTo(1), "Expected at least one change");
|
|
85
85
|
|
|
86
86
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
87
|
-
Assert.
|
|
87
|
+
Assert.IsTrue(imp != null);
|
|
88
88
|
Assert.That(
|
|
89
89
|
imp.maxTextureSize,
|
|
90
90
|
Is.EqualTo(256),
|
|
@@ -100,7 +100,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
100
100
|
AssetDatabase.Refresh();
|
|
101
101
|
|
|
102
102
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
103
|
-
Assert.
|
|
103
|
+
Assert.IsTrue(imp != null, "Importer should exist");
|
|
104
104
|
imp.maxTextureSize = 1024;
|
|
105
105
|
imp.SaveAndReimport();
|
|
106
106
|
|
|
@@ -108,15 +108,15 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
108
108
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
109
109
|
);
|
|
110
110
|
window._fitMode = FitMode.ShrinkOnly;
|
|
111
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
111
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
112
112
|
{
|
|
113
|
-
AssetDatabase.LoadAssetAtPath<
|
|
113
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
114
114
|
};
|
|
115
115
|
int count = window.CalculateTextureChanges(true);
|
|
116
116
|
Assert.That(count, Is.GreaterThanOrEqualTo(1), "Expected at least one change");
|
|
117
117
|
|
|
118
118
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
119
|
-
Assert.
|
|
119
|
+
Assert.IsTrue(imp != null);
|
|
120
120
|
Assert.That(imp.maxTextureSize, Is.EqualTo(256), "Should keep exact POT");
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -128,7 +128,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
128
128
|
AssetDatabase.Refresh();
|
|
129
129
|
|
|
130
130
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
131
|
-
Assert.
|
|
131
|
+
Assert.IsTrue(imp != null, "Importer should exist");
|
|
132
132
|
imp.maxTextureSize = 2048;
|
|
133
133
|
imp.SaveAndReimport();
|
|
134
134
|
|
|
@@ -136,15 +136,15 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
136
136
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
137
137
|
);
|
|
138
138
|
window._fitMode = FitMode.ShrinkOnly;
|
|
139
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
139
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
140
140
|
{
|
|
141
|
-
AssetDatabase.LoadAssetAtPath<
|
|
141
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
142
142
|
};
|
|
143
143
|
int count = window.CalculateTextureChanges(true);
|
|
144
144
|
Assert.That(count, Is.GreaterThanOrEqualTo(1), "Expected at least one change");
|
|
145
145
|
|
|
146
146
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
147
|
-
Assert.
|
|
147
|
+
Assert.IsTrue(imp != null);
|
|
148
148
|
Assert.That(imp.maxTextureSize, Is.EqualTo(256), "Should shrink to 256");
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -156,7 +156,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
156
156
|
AssetDatabase.Refresh();
|
|
157
157
|
|
|
158
158
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
159
|
-
Assert.
|
|
159
|
+
Assert.IsTrue(imp != null);
|
|
160
160
|
imp.maxTextureSize = 2048;
|
|
161
161
|
imp.SaveAndReimport();
|
|
162
162
|
|
|
@@ -164,16 +164,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
164
164
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
165
165
|
);
|
|
166
166
|
window._fitMode = FitMode.GrowOnly;
|
|
167
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
167
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
168
168
|
{
|
|
169
|
-
AssetDatabase.LoadAssetAtPath<
|
|
169
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
170
170
|
};
|
|
171
171
|
int count = window.CalculateTextureChanges(true);
|
|
172
172
|
|
|
173
173
|
// Expect no change because it's already large enough (GrowOnly)
|
|
174
174
|
Assert.That(count, Is.EqualTo(0));
|
|
175
175
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
176
|
-
Assert.
|
|
176
|
+
Assert.IsTrue(imp != null);
|
|
177
177
|
Assert.That(imp.maxTextureSize, Is.EqualTo(2048));
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -185,7 +185,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
185
185
|
AssetDatabase.Refresh();
|
|
186
186
|
|
|
187
187
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
188
|
-
Assert.
|
|
188
|
+
Assert.IsTrue(imp != null);
|
|
189
189
|
imp.maxTextureSize = 32;
|
|
190
190
|
imp.SaveAndReimport();
|
|
191
191
|
|
|
@@ -195,16 +195,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
195
195
|
window._fitMode = FitMode.RoundToNearest;
|
|
196
196
|
window._minAllowedTextureSize = 256;
|
|
197
197
|
window._maxAllowedTextureSize = 8192;
|
|
198
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
198
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
199
199
|
{
|
|
200
|
-
AssetDatabase.LoadAssetAtPath<
|
|
200
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
int count = window.CalculateTextureChanges(true);
|
|
204
204
|
Assert.That(count, Is.GreaterThanOrEqualTo(1));
|
|
205
205
|
|
|
206
206
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
207
|
-
Assert.
|
|
207
|
+
Assert.IsTrue(imp != null);
|
|
208
208
|
Assert.That(imp.maxTextureSize, Is.EqualTo(256));
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -217,7 +217,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
217
217
|
AssetDatabase.Refresh();
|
|
218
218
|
|
|
219
219
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
220
|
-
Assert.
|
|
220
|
+
Assert.IsTrue(imp != null);
|
|
221
221
|
imp.maxTextureSize = 128;
|
|
222
222
|
imp.SaveAndReimport();
|
|
223
223
|
|
|
@@ -227,16 +227,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
227
227
|
window._fitMode = FitMode.GrowOnly;
|
|
228
228
|
window._minAllowedTextureSize = 32;
|
|
229
229
|
window._maxAllowedTextureSize = 8192;
|
|
230
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
230
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
231
231
|
{
|
|
232
|
-
AssetDatabase.LoadAssetAtPath<
|
|
232
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
233
233
|
};
|
|
234
234
|
|
|
235
235
|
int count = window.CalculateTextureChanges(true);
|
|
236
236
|
Assert.That(count, Is.GreaterThanOrEqualTo(1));
|
|
237
237
|
|
|
238
238
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
239
|
-
Assert.
|
|
239
|
+
Assert.IsTrue(imp != null);
|
|
240
240
|
Assert.That(imp.maxTextureSize, Is.EqualTo(8192));
|
|
241
241
|
}
|
|
242
242
|
|
|
@@ -248,7 +248,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
248
248
|
AssetDatabase.Refresh();
|
|
249
249
|
|
|
250
250
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
251
|
-
Assert.
|
|
251
|
+
Assert.IsTrue(imp != null);
|
|
252
252
|
imp.maxTextureSize = 128;
|
|
253
253
|
imp.SaveAndReimport();
|
|
254
254
|
|
|
@@ -257,15 +257,15 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
257
257
|
);
|
|
258
258
|
window._fitMode = FitMode.RoundToNearest;
|
|
259
259
|
window._applyToAndroid = true;
|
|
260
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
260
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
261
261
|
{
|
|
262
|
-
AssetDatabase.LoadAssetAtPath<
|
|
262
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
_ = window.CalculateTextureChanges(true);
|
|
266
266
|
|
|
267
267
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
268
|
-
Assert.
|
|
268
|
+
Assert.IsTrue(imp != null);
|
|
269
269
|
TextureImporterPlatformSettings android = imp.GetPlatformTextureSettings("Android");
|
|
270
270
|
Assert.IsTrue(android.overridden);
|
|
271
271
|
Assert.That(android.maxTextureSize, Is.EqualTo(256));
|
|
@@ -282,8 +282,8 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
282
282
|
|
|
283
283
|
TextureImporter spriteImp = AssetImporter.GetAtPath(spritePath) as TextureImporter;
|
|
284
284
|
TextureImporter texImp = AssetImporter.GetAtPath(texPath) as TextureImporter;
|
|
285
|
-
Assert.
|
|
286
|
-
Assert.
|
|
285
|
+
Assert.IsTrue(spriteImp != null);
|
|
286
|
+
Assert.IsTrue(texImp != null);
|
|
287
287
|
spriteImp.textureType = TextureImporterType.Sprite;
|
|
288
288
|
spriteImp.maxTextureSize = 1024;
|
|
289
289
|
texImp.textureType = TextureImporterType.Default;
|
|
@@ -296,9 +296,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
296
296
|
);
|
|
297
297
|
window._fitMode = FitMode.ShrinkOnly;
|
|
298
298
|
window._onlySprites = true;
|
|
299
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
299
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
300
300
|
{
|
|
301
|
-
AssetDatabase.LoadAssetAtPath<
|
|
301
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
302
302
|
};
|
|
303
303
|
|
|
304
304
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -331,9 +331,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
331
331
|
window._fitMode = FitMode.GrowOnly;
|
|
332
332
|
window._nameFilter = "hero";
|
|
333
333
|
window._useRegexForName = false;
|
|
334
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
334
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
335
335
|
{
|
|
336
|
-
AssetDatabase.LoadAssetAtPath<
|
|
336
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
337
337
|
};
|
|
338
338
|
|
|
339
339
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -366,9 +366,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
366
366
|
window._fitMode = FitMode.GrowOnly;
|
|
367
367
|
window._nameFilter = "^item\\d{2}$";
|
|
368
368
|
window._useRegexForName = true;
|
|
369
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
369
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
370
370
|
{
|
|
371
|
-
AssetDatabase.LoadAssetAtPath<
|
|
371
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
372
372
|
};
|
|
373
373
|
|
|
374
374
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -388,9 +388,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
388
388
|
CreatePng(unlabeledPath, 300, 100, Color.gray);
|
|
389
389
|
AssetDatabase.Refresh();
|
|
390
390
|
|
|
391
|
-
|
|
392
|
-
labeledPath
|
|
393
|
-
);
|
|
391
|
+
Object labeledObj = AssetDatabase.LoadAssetAtPath<Object>(labeledPath);
|
|
394
392
|
AssetDatabase.SetLabels(labeledObj, new[] { "FitMe", "TagA" });
|
|
395
393
|
AssetDatabase.SaveAssets();
|
|
396
394
|
|
|
@@ -406,9 +404,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
406
404
|
);
|
|
407
405
|
window._fitMode = FitMode.GrowOnly;
|
|
408
406
|
window._labelFilterCsv = "FitMe";
|
|
409
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
407
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
410
408
|
{
|
|
411
|
-
AssetDatabase.LoadAssetAtPath<
|
|
409
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
412
410
|
};
|
|
413
411
|
|
|
414
412
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -435,7 +433,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
435
433
|
aImp.SaveAndReimport();
|
|
436
434
|
bImp.SaveAndReimport();
|
|
437
435
|
|
|
438
|
-
|
|
436
|
+
Object aObj = AssetDatabase.LoadAssetAtPath<Object>(aPath);
|
|
439
437
|
Selection.objects = new[] { aObj };
|
|
440
438
|
|
|
441
439
|
FitTextureSizeWindow window = Track(
|
|
@@ -467,9 +465,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
467
465
|
FitTextureSizeWindow window = Track(
|
|
468
466
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
469
467
|
);
|
|
470
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
468
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
471
469
|
{
|
|
472
|
-
AssetDatabase.LoadAssetAtPath<
|
|
470
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
473
471
|
};
|
|
474
472
|
|
|
475
473
|
// Case-sensitive search for lower-case 'hero' should not match 'Hero'
|
|
@@ -494,7 +492,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
494
492
|
CreatePng(path, 300, 100, Color.gray);
|
|
495
493
|
AssetDatabase.Refresh();
|
|
496
494
|
|
|
497
|
-
|
|
495
|
+
Object obj = AssetDatabase.LoadAssetAtPath<Object>(path);
|
|
498
496
|
AssetDatabase.SetLabels(obj, new[] { "FitMe" });
|
|
499
497
|
AssetDatabase.SaveAssets();
|
|
500
498
|
|
|
@@ -508,9 +506,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
508
506
|
window._fitMode = FitMode.GrowOnly;
|
|
509
507
|
window._labelFilterCsv = "fitme";
|
|
510
508
|
window._caseSensitiveNameFilter = true;
|
|
511
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
509
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
512
510
|
{
|
|
513
|
-
AssetDatabase.LoadAssetAtPath<
|
|
511
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
514
512
|
};
|
|
515
513
|
|
|
516
514
|
// Case-sensitive 'fitme' should not match 'FitMe'
|
|
@@ -541,9 +539,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
541
539
|
);
|
|
542
540
|
window._fitMode = FitMode.RoundToNearest;
|
|
543
541
|
window._applyToStandalone = true;
|
|
544
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
542
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
545
543
|
{
|
|
546
|
-
AssetDatabase.LoadAssetAtPath<
|
|
544
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
547
545
|
};
|
|
548
546
|
|
|
549
547
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -570,9 +568,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
570
568
|
);
|
|
571
569
|
window._fitMode = FitMode.RoundToNearest;
|
|
572
570
|
window._applyToiOS = true;
|
|
573
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
571
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
574
572
|
{
|
|
575
|
-
AssetDatabase.LoadAssetAtPath<
|
|
573
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
576
574
|
};
|
|
577
575
|
|
|
578
576
|
_ = window.CalculateTextureChanges(true);
|
|
@@ -596,9 +594,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
596
594
|
CreatePng(directFile, 300, 100, Color.gray);
|
|
597
595
|
AssetDatabase.Refresh();
|
|
598
596
|
|
|
599
|
-
|
|
600
|
-
labeledUnderFolder
|
|
601
|
-
);
|
|
597
|
+
Object labeledObj = AssetDatabase.LoadAssetAtPath<Object>(labeledUnderFolder);
|
|
602
598
|
AssetDatabase.SetLabels(labeledObj, new[] { "OnlyMe" });
|
|
603
599
|
AssetDatabase.SaveAssets();
|
|
604
600
|
|
|
@@ -611,12 +607,8 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
611
607
|
directImp.SaveAndReimport();
|
|
612
608
|
|
|
613
609
|
// Select folder and the direct file simultaneously
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
);
|
|
617
|
-
UnityEngine.Object directObj = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(
|
|
618
|
-
directFile
|
|
619
|
-
);
|
|
610
|
+
Object folderObj = AssetDatabase.LoadAssetAtPath<Object>(folder);
|
|
611
|
+
Object directObj = AssetDatabase.LoadAssetAtPath<Object>(directFile);
|
|
620
612
|
Selection.objects = new[] { folderObj, directObj };
|
|
621
613
|
|
|
622
614
|
FitTextureSizeWindow window = Track(
|
|
@@ -658,9 +650,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
658
650
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
659
651
|
);
|
|
660
652
|
window._fitMode = FitMode.GrowOnly;
|
|
661
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
653
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
662
654
|
{
|
|
663
|
-
AssetDatabase.LoadAssetAtPath<
|
|
655
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
664
656
|
};
|
|
665
657
|
|
|
666
658
|
int changed = window.CalculateTextureChanges(true);
|
|
@@ -682,7 +674,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
682
674
|
AssetDatabase.Refresh();
|
|
683
675
|
|
|
684
676
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
685
|
-
Assert.
|
|
677
|
+
Assert.IsTrue(imp != null);
|
|
686
678
|
imp.maxTextureSize = 2048;
|
|
687
679
|
imp.SaveAndReimport();
|
|
688
680
|
|
|
@@ -690,16 +682,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
690
682
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
691
683
|
);
|
|
692
684
|
window._fitMode = FitMode.RoundToNearest;
|
|
693
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
685
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
694
686
|
{
|
|
695
|
-
AssetDatabase.LoadAssetAtPath<
|
|
687
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
696
688
|
};
|
|
697
689
|
|
|
698
690
|
int count = window.CalculateTextureChanges(true);
|
|
699
691
|
Assert.That(count, Is.GreaterThanOrEqualTo(1));
|
|
700
692
|
|
|
701
693
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
702
|
-
Assert.
|
|
694
|
+
Assert.IsTrue(imp != null);
|
|
703
695
|
Assert.That(imp.maxTextureSize, Is.EqualTo(256));
|
|
704
696
|
}
|
|
705
697
|
|
|
@@ -712,7 +704,7 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
712
704
|
AssetDatabase.Refresh();
|
|
713
705
|
|
|
714
706
|
TextureImporter imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
715
|
-
Assert.
|
|
707
|
+
Assert.IsTrue(imp != null);
|
|
716
708
|
imp.maxTextureSize = 128;
|
|
717
709
|
imp.SaveAndReimport();
|
|
718
710
|
|
|
@@ -720,16 +712,16 @@ namespace WallstopStudios.UnityHelpers.Tests.Editor.Windows
|
|
|
720
712
|
ScriptableObject.CreateInstance<FitTextureSizeWindow>()
|
|
721
713
|
);
|
|
722
714
|
window._fitMode = FitMode.RoundToNearest;
|
|
723
|
-
window._textureSourcePaths = new System.Collections.Generic.List<
|
|
715
|
+
window._textureSourcePaths = new System.Collections.Generic.List<Object>
|
|
724
716
|
{
|
|
725
|
-
AssetDatabase.LoadAssetAtPath<
|
|
717
|
+
AssetDatabase.LoadAssetAtPath<Object>(Root),
|
|
726
718
|
};
|
|
727
719
|
|
|
728
720
|
int count = window.CalculateTextureChanges(true);
|
|
729
721
|
Assert.That(count, Is.GreaterThanOrEqualTo(1));
|
|
730
722
|
|
|
731
723
|
imp = AssetImporter.GetAtPath(path) as TextureImporter;
|
|
732
|
-
Assert.
|
|
724
|
+
Assert.IsTrue(imp != null);
|
|
733
725
|
Assert.That(imp.maxTextureSize, Is.EqualTo(512));
|
|
734
726
|
}
|
|
735
727
|
|
|
@@ -10,22 +10,11 @@ namespace WallstopStudios.UnityHelpers.Tests.Attributes
|
|
|
10
10
|
[TestFixture]
|
|
11
11
|
public sealed class RelationalComponentInitializerTests
|
|
12
12
|
{
|
|
13
|
-
private static bool CacheContainsField(string
|
|
13
|
+
private static bool CacheContainsField(string cache, FieldInfo field)
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
BindingFlags.Static | BindingFlags.NonPublic
|
|
19
|
-
);
|
|
20
|
-
Assert.IsNotNull(fi, $"Missing cache field '{cacheFieldName}' on ReflectionHelpers.");
|
|
21
|
-
|
|
22
|
-
object dict = fi.GetValue(null);
|
|
23
|
-
Assert.IsNotNull(dict, $"Cache '{cacheFieldName}' should be initialized.");
|
|
24
|
-
|
|
25
|
-
MethodInfo contains = dict.GetType().GetMethod("ContainsKey");
|
|
26
|
-
Assert.IsNotNull(contains, "Cache dictionary missing ContainsKey method.");
|
|
27
|
-
|
|
28
|
-
return (bool)contains.Invoke(dict, new object[] { field });
|
|
15
|
+
return cache == "FieldGetterCache"
|
|
16
|
+
? ReflectionHelpers.IsFieldGetterCached(field)
|
|
17
|
+
: ReflectionHelpers.IsFieldSetterCached(field);
|
|
29
18
|
}
|
|
30
19
|
|
|
31
20
|
[Test]
|
|
@@ -214,35 +214,35 @@ namespace WallstopStudios.UnityHelpers.Tests.DataStructures
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
[Ignore("TODO: FIX ME")]
|
|
218
|
-
[Test]
|
|
219
|
-
public void UnitBoundsAtGridCenterOnTenGridConsistentWithKDTree()
|
|
220
|
-
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
217
|
+
// [Ignore("TODO: FIX ME")]
|
|
218
|
+
// [Test]
|
|
219
|
+
// public void UnitBoundsAtGridCenterOnTenGridConsistentWithKDTree()
|
|
220
|
+
// {
|
|
221
|
+
// Vector3Int size = new(10, 10, 10);
|
|
222
|
+
// Vector3[] points = CreateGridPoints(size);
|
|
223
|
+
// KdTree3D<Vector3> kd = new(points, p => p);
|
|
224
|
+
// OctTree3D<Vector3> oct = new(points, p => p);
|
|
225
|
+
//
|
|
226
|
+
// Bounds b = new(new Vector3(4.5f, 4.5f, 4.5f), new Vector3(1f, 1f, 1f));
|
|
227
|
+
// List<Vector3> kdResults = new();
|
|
228
|
+
// kd.GetElementsInBounds(b, kdResults);
|
|
229
|
+
// List<Vector3> octResults = new();
|
|
230
|
+
// oct.GetElementsInBounds(b, octResults);
|
|
231
|
+
//
|
|
232
|
+
// SpatialDiagnostics.AssertMatchingResults(
|
|
233
|
+
// "Unit bounds at grid center mismatch",
|
|
234
|
+
// b,
|
|
235
|
+
// kdResults,
|
|
236
|
+
// octResults
|
|
237
|
+
// );
|
|
238
|
+
//
|
|
239
|
+
// Assert.AreEqual(
|
|
240
|
+
// 5,
|
|
241
|
+
// kdResults.Count,
|
|
242
|
+
// "Expected KD to return 5 points for unit bounds at grid center, got {0}.",
|
|
243
|
+
// kdResults.Count
|
|
244
|
+
// );
|
|
245
|
+
// }
|
|
246
246
|
|
|
247
247
|
[Test]
|
|
248
248
|
public void EdgeTouchingBoundsConsistentAcrossTrees()
|