com.wallstop-studios.unity-helpers 2.0.0-rc81.9 → 2.0.1

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.
Files changed (264) hide show
  1. package/.editorconfig +1 -1
  2. package/.gitattributes +1 -1
  3. package/.githooks/pre-commit +31 -5
  4. package/.githooks/pre-push +50 -0
  5. package/.github/dependabot.yml +24 -2
  6. package/.github/scripts/check-markdown-links.ps1 +77 -0
  7. package/.github/scripts/check_markdown_links.py +89 -0
  8. package/.github/scripts/check_markdown_url_encoding.py +74 -0
  9. package/.github/scripts/validate_markdown_links.py +194 -0
  10. package/.github/workflows/csharpier-autofix.yml +152 -0
  11. package/.github/workflows/format-on-demand.yml +305 -0
  12. package/.github/workflows/lint-doc-links.yml +8 -5
  13. package/.github/workflows/markdown-json.yml +6 -2
  14. package/.github/workflows/npm-publish.yml +1 -1
  15. package/.github/workflows/prettier-autofix.yml +195 -0
  16. package/.github/workflows/update-dotnet-tools.yml +80 -0
  17. package/.github/workflows/yaml-format-lint.yml +41 -0
  18. package/.lychee.toml +4 -4
  19. package/.markdownlint.jsonc +21 -0
  20. package/.pre-commit-config.yaml +11 -3
  21. package/.yamllint.yaml +31 -0
  22. package/AGENTS.md +5 -1
  23. package/Docs/CHANGELOG.md +11 -0
  24. package/Docs/CONTRIBUTING.md +49 -0
  25. package/Docs/CONTRIBUTING.md.meta +7 -0
  26. package/{EDITOR_TOOLS_GUIDE.md → Docs/EDITOR_TOOLS_GUIDE.md} +4 -0
  27. package/Docs/EFFECTS_SYSTEM.md +1316 -0
  28. package/{EFFECTS_SYSTEM_TUTORIAL.md → Docs/EFFECTS_SYSTEM_TUTORIAL.md} +1 -1
  29. package/{GETTING_STARTED.md → Docs/GETTING_STARTED.md} +50 -64
  30. package/{GLOSSARY.md → Docs/GLOSSARY.md} +4 -4
  31. package/Docs/HELPER_UTILITIES.md +885 -0
  32. package/Docs/HELPER_UTILITIES.md.meta +7 -0
  33. package/{INDEX.md → Docs/INDEX.md} +107 -62
  34. package/Docs/MATH_AND_EXTENSIONS.md +1039 -0
  35. package/{RANDOM_PERFORMANCE.md → Docs/RANDOM_PERFORMANCE.md} +15 -15
  36. package/{RELATIONAL_COMPONENTS.md → Docs/RELATIONAL_COMPONENTS.md} +111 -84
  37. package/{SERIALIZATION.md → Docs/SERIALIZATION.md} +15 -0
  38. package/{SPATIAL_TREES_2D_GUIDE.md → Docs/SPATIAL_TREES_2D_GUIDE.md} +2 -2
  39. package/{SPATIAL_TREES_3D_GUIDE.md → Docs/SPATIAL_TREES_3D_GUIDE.md} +1 -1
  40. package/Docs/SPATIAL_TREE_2D_PERFORMANCE.md +241 -0
  41. package/Docs/SPATIAL_TREE_3D_PERFORMANCE.md +243 -0
  42. package/{THIRD_PARTY_NOTICES.md → Docs/THIRD_PARTY_NOTICES.md} +1 -1
  43. package/Docs/UTILITY_COMPONENTS.md +906 -0
  44. package/Docs/UTILITY_COMPONENTS.md.meta +7 -0
  45. package/Docs/VISUAL_COMPONENTS.md +337 -0
  46. package/Docs/VISUAL_COMPONENTS.md.meta +7 -0
  47. package/Editor/AnimationEventEditor.cs +337 -160
  48. package/Editor/Core/Helper/AnimationEventHelpers.cs +178 -152
  49. package/Editor/CustomEditors/PersistentDirectoryGUI.cs +20 -11
  50. package/Editor/CustomEditors/TexturePlatformOverrideEntryDrawer.cs +11 -2
  51. package/Editor/FitTextureSizeWindow.cs +43 -19
  52. package/Editor/PersistentDirectorySettings.cs +64 -12
  53. package/Editor/PrefabChecker.cs +72 -5
  54. package/Editor/Sprites/AnimationCopier.cs +131 -55
  55. package/Editor/Sprites/AnimationCreator.cs +63 -22
  56. package/Editor/Sprites/AnimationViewerWindow.cs +42 -6
  57. package/Editor/Sprites/TexturePlatformNameHelper.cs +50 -39
  58. package/Editor/Sprites/TextureResizerWizard.cs +23 -1
  59. package/Editor/Sprites/TextureSettingsApplierWindow.cs +148 -85
  60. package/Editor/Tools/ImageBlurTool.cs +81 -10
  61. package/Editor/Utils/EditorUi.cs +1 -1
  62. package/Editor/Utils/ScriptableObjectSingletonCreator.cs +1 -1
  63. package/README.md +428 -2433
  64. package/Runtime/AssemblyInfo.cs +4 -0
  65. package/Runtime/Core/Attributes/NotNullAttribute.cs +1 -3
  66. package/Runtime/Core/Attributes/RelationalComponentAssigner.cs +50 -5
  67. package/Runtime/Core/DataStructure/CyclicBuffer.cs +0 -1
  68. package/Runtime/Core/DataStructure/KDTree3D.cs +1 -1
  69. package/Runtime/Core/DataStructure/OctTree3D.cs +1 -1
  70. package/Runtime/Core/Extension/AsyncOperationExtensions.cs +122 -0
  71. package/Runtime/Core/Extension/RandomExtensions.cs +68 -0
  72. package/Runtime/Core/Extension/WallstopStudiosLogger.cs +16 -0
  73. package/Runtime/Core/Helper/Partials/ObjectHelpers.cs +4 -1
  74. package/Runtime/Core/Helper/ReflectionHelpers.cs +21 -10
  75. package/Runtime/Core/Helper/SpriteHelpers.cs +3 -1
  76. package/Runtime/Core/Helper/UnityMainThreadDispatcher.cs +45 -1
  77. package/Runtime/Core/Serialization/JsonConverters/GameObjectConverter.cs +13 -5
  78. package/Runtime/Core/Serialization/JsonConverters/ResolutionConverter.cs +1 -1
  79. package/Runtime/Core/Serialization/JsonConverters/TypeConverter.cs +1 -1
  80. package/Runtime/Core/Serialization/ProtobufUnitySurrogates.cs +24 -29
  81. package/Runtime/Core/Serialization/Serializer.cs +101 -0
  82. package/Runtime/Integrations/Reflex/AssemblyInfo.cs +7 -0
  83. package/Runtime/Integrations/Reflex/AssemblyInfo.cs.meta +11 -0
  84. package/Runtime/Integrations/Reflex/ContainerRelationalExtensions.cs +198 -0
  85. package/Runtime/Integrations/Reflex/ContainerRelationalExtensions.cs.meta +11 -0
  86. package/Runtime/Integrations/Reflex/RelationalComponentsInstaller.cs +86 -0
  87. package/Runtime/Integrations/Reflex/RelationalComponentsInstaller.cs.meta +11 -0
  88. package/Runtime/Integrations/Reflex/RelationalReflexSceneBootstrapper.cs +316 -0
  89. package/Runtime/Integrations/Reflex/RelationalReflexSceneBootstrapper.cs.meta +11 -0
  90. package/Runtime/Integrations/Reflex/RelationalSceneAssignmentOptions.cs +86 -0
  91. package/Runtime/Integrations/Reflex/RelationalSceneAssignmentOptions.cs.meta +11 -0
  92. package/Runtime/Integrations/Reflex/WallstopStudios.UnityHelpers.Integration.Reflex.asmdef +20 -0
  93. package/Runtime/Integrations/Reflex/WallstopStudios.UnityHelpers.Integration.Reflex.asmdef.meta +7 -0
  94. package/Runtime/Integrations/Reflex.meta +8 -0
  95. package/Runtime/Integrations/VContainer/AssemblyInfo.cs +9 -0
  96. package/Runtime/Integrations/VContainer/AssemblyInfo.cs.meta +3 -0
  97. package/Runtime/Integrations/VContainer/ObjectResolverRelationalExtensions.cs +96 -0
  98. package/Runtime/Integrations/VContainer/RelationalComponentEntryPoint.cs +90 -10
  99. package/Runtime/Integrations/VContainer/RelationalComponentsBuilderExtensions.cs +13 -1
  100. package/Runtime/Integrations/VContainer/RelationalObjectPools.cs +114 -0
  101. package/Runtime/Integrations/VContainer/RelationalObjectPools.cs.meta +11 -0
  102. package/Runtime/Integrations/VContainer/RelationalSceneAssignmentOptions.cs +16 -4
  103. package/Runtime/Integrations/VContainer/RelationalSceneLoadListener.cs +241 -0
  104. package/Runtime/Integrations/VContainer/RelationalSceneLoadListener.cs.meta +11 -0
  105. package/Runtime/Integrations/Zenject/AssemblyInfo.cs +9 -0
  106. package/Runtime/Integrations/Zenject/AssemblyInfo.cs.meta +3 -0
  107. package/Runtime/Integrations/Zenject/DiContainerRelationalExtensions.cs +69 -2
  108. package/Runtime/Integrations/Zenject/RelationalComponentSceneInitializer.cs +89 -12
  109. package/Runtime/Integrations/Zenject/RelationalComponentsInstaller.cs +23 -1
  110. package/Runtime/Integrations/Zenject/RelationalMemoryPools.cs +44 -0
  111. package/Runtime/Integrations/Zenject/RelationalMemoryPools.cs.meta +11 -0
  112. package/Runtime/Integrations/Zenject/RelationalSceneAssignmentOptions.cs +16 -10
  113. package/Runtime/Integrations/Zenject/RelationalSceneLoadListener.cs +243 -0
  114. package/Runtime/Integrations/Zenject/RelationalSceneLoadListener.cs.meta +11 -0
  115. package/Runtime/Tags/AttributeMetadataCache.cs +1 -4
  116. package/Runtime/Utils/Buffers.cs +4 -4
  117. package/Runtime/Utils/ScriptableObjectSingleton.cs +1 -2
  118. package/Runtime/Utils/SetTextureImportData.cs +3 -1
  119. package/Runtime/Utils/TextureScale.cs +10 -2
  120. package/Runtime/Visuals/UGUI/EnhancedImage.cs +6 -0
  121. package/Runtime/Visuals/UIToolkit/LayeredImage.cs +4 -1
  122. package/Samples~/DI - Reflex/README.md +527 -0
  123. package/Samples~/DI - Reflex/README.md.meta +7 -0
  124. package/Samples~/DI - Reflex/Scripts/ReflexPaletteService.cs +36 -0
  125. package/Samples~/DI - Reflex/Scripts/ReflexPaletteService.cs.meta +11 -0
  126. package/Samples~/DI - Reflex/Scripts/ReflexRelationalConsumer.cs +79 -0
  127. package/Samples~/DI - Reflex/Scripts/ReflexRelationalConsumer.cs.meta +11 -0
  128. package/Samples~/DI - Reflex/Scripts/ReflexSampleInstaller.cs +30 -0
  129. package/Samples~/DI - Reflex/Scripts/ReflexSampleInstaller.cs.meta +11 -0
  130. package/Samples~/DI - Reflex/Scripts/ReflexSpawner.cs +79 -0
  131. package/Samples~/DI - Reflex/Scripts/ReflexSpawner.cs.meta +11 -0
  132. package/Samples~/DI - Reflex/Scripts/Samples.UnityHelpers.DI.Reflex.asmdef +26 -0
  133. package/Samples~/DI - Reflex/Scripts/Samples.UnityHelpers.DI.Reflex.asmdef.meta +9 -0
  134. package/Samples~/DI - Reflex/Scripts.meta +8 -0
  135. package/Samples~/DI - Reflex.meta +8 -0
  136. package/Samples~/DI - VContainer/README.md +238 -56
  137. package/Samples~/DI - VContainer/Scripts/GameLifetimeScope.cs +22 -4
  138. package/Samples~/DI - VContainer/Scripts/RelationalConsumer.cs +5 -2
  139. package/Samples~/DI - VContainer/Scripts/Spawner.cs +113 -4
  140. package/Samples~/DI - Zenject/README.md +223 -58
  141. package/Samples~/DI - Zenject/Scripts/RelationalConsumer.cs +3 -0
  142. package/Samples~/DI - Zenject/Scripts/RelationalConsumerPool.cs +37 -0
  143. package/Samples~/DI - Zenject/Scripts/RelationalConsumerPool.cs.meta +12 -0
  144. package/Samples~/DI - Zenject/Scripts/SpawnerZenject.cs +74 -3
  145. package/Samples~/Random - PRNG/README.md +2 -1
  146. package/Samples~/Relational Components - Basic/README.md +3 -1
  147. package/Samples~/Serialization - JSON/README.md +2 -1
  148. package/Samples~/Spatial Structures - 2D and 3D/README.md +2 -1
  149. package/Samples~/UGUI - EnhancedImage/README.md +2 -1
  150. package/Samples~/UI Toolkit - MultiFile Selector (Editor)/README.md +2 -1
  151. package/Tests/Editor/Attributes/AnimationEventHelpersTests.cs +16 -0
  152. package/Tests/Editor/Core/Attributes/RelationalComponentAssignerTests.cs +32 -34
  153. package/Tests/Editor/Integrations/Reflex/ReflexIntegrationCompilationTests.cs +41 -0
  154. package/Tests/Editor/Integrations/Reflex/ReflexIntegrationCompilationTests.cs.meta +11 -0
  155. package/Tests/Editor/Integrations/Reflex/WallstopStudios.UnityHelpers.Tests.Editor.Reflex.asmdef +27 -0
  156. package/Tests/Editor/Integrations/Reflex/WallstopStudios.UnityHelpers.Tests.Editor.Reflex.asmdef.meta +7 -0
  157. package/Tests/Editor/Integrations/Reflex.meta +8 -0
  158. package/Tests/Editor/Integrations/VContainer/VContainerRelationalEntryPointTests.cs +21 -18
  159. package/Tests/Editor/Integrations/VContainer/VContainerRelationalHelpersTests.cs +164 -0
  160. package/Tests/Editor/Integrations/VContainer/VContainerRelationalHelpersTests.cs.meta +11 -0
  161. package/Tests/Editor/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Editor.VContainer.asmdef +2 -1
  162. package/Tests/Editor/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Editor.Zenject.asmdef +3 -2
  163. package/Tests/Editor/Integrations/Zenject/ZenjectRelationalHelpersTests.cs +127 -0
  164. package/Tests/Editor/Integrations/Zenject/ZenjectRelationalHelpersTests.cs.meta +11 -0
  165. package/Tests/Editor/Integrations/Zenject/ZenjectRelationalInitializerTests.cs +25 -23
  166. package/Tests/Editor/PersistentDirectorySettingsTests.cs +58 -0
  167. package/Tests/Editor/PersistentDirectorySettingsTests.cs.meta +11 -0
  168. package/Tests/Editor/PrefabCheckerReportTests.cs +32 -0
  169. package/Tests/Editor/PrefabCheckerReportTests.cs.meta +11 -0
  170. package/Tests/Editor/Sprites/AnimationCopierFilterTests.cs +63 -0
  171. package/Tests/Editor/Sprites/AnimationCopierFilterTests.cs.meta +11 -0
  172. package/Tests/Editor/Sprites/AnimationCopierWindowTests.cs +1 -1
  173. package/Tests/Editor/Sprites/AnimationViewerWindowTests.cs +38 -0
  174. package/Tests/Editor/Sprites/AnimationViewerWindowTests.cs.meta +11 -0
  175. package/Tests/Editor/Sprites/ScriptableSpriteAtlasEditorTests.cs +1 -1
  176. package/Tests/Editor/Sprites/SpriteCropperAdditionalTests.cs +12 -12
  177. package/Tests/Editor/Sprites/SpriteCropperTests.cs +9 -9
  178. package/Tests/Editor/Sprites/SpritePivotAdjusterTests.cs +3 -3
  179. package/Tests/Editor/Sprites/TexturePlatformNameHelperTests.cs +18 -0
  180. package/Tests/Editor/Sprites/TextureResizerWizardTests.cs +5 -5
  181. package/Tests/Editor/Sprites/TextureSettingsApplierAPITests.cs +3 -3
  182. package/Tests/Editor/Sprites/TextureSettingsApplierWizardAdditionalTests.cs +4 -4
  183. package/Tests/Editor/Sprites/TextureSettingsApplierWizardTests.cs +4 -4
  184. package/Tests/Editor/Tools/ImageBlurToolTests.cs +22 -110
  185. package/Tests/Editor/Utils/CommonTestBase.cs +60 -1
  186. package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorTests.cs +6 -6
  187. package/Tests/Editor/Windows/FitTextureSizeWindowTests.cs +66 -74
  188. package/Tests/Runtime/Attributes/RelationalComponentInitializerTests.cs +4 -15
  189. package/Tests/Runtime/DataStructures/SpatialTree3DBoundsConsistencyTests.cs +29 -29
  190. package/Tests/Runtime/Extensions/AsyncOperationExtensionsTests.cs +179 -0
  191. package/Tests/Runtime/Extensions/RandomExtensionTests.cs +55 -0
  192. package/Tests/Runtime/Integrations/Reflex/RelationalComponentsReflexTests.cs +445 -0
  193. package/Tests/Runtime/Integrations/Reflex/RelationalComponentsReflexTests.cs.meta +11 -0
  194. package/Tests/Runtime/Integrations/Reflex/WallstopStudios.UnityHelpers.Tests.Runtime.Reflex.asmdef +28 -0
  195. package/Tests/Runtime/Integrations/Reflex/WallstopStudios.UnityHelpers.Tests.Runtime.Reflex.asmdef.meta +7 -0
  196. package/Tests/Runtime/Integrations/Reflex.meta +8 -0
  197. package/Tests/Runtime/Integrations/VContainer/RelationalComponentsVContainerTests.cs +257 -221
  198. package/Tests/Runtime/Integrations/VContainer/RelationalObjectPoolsVContainerTests.cs +91 -0
  199. package/Tests/Runtime/Integrations/VContainer/RelationalObjectPoolsVContainerTests.cs.meta +11 -0
  200. package/Tests/Runtime/Integrations/Zenject/RelationalComponentsZenjectTests.cs +251 -233
  201. package/Tests/Runtime/Performance/RandomPerformanceTests.cs +1 -1
  202. package/Tests/Runtime/Performance/SpatialTree2DPerformanceTests.cs +6 -1
  203. package/Tests/Runtime/Performance/SpatialTree3DPerformanceTests.cs +4 -1
  204. package/Tests/Runtime/Serialization/JsonConverterAdditionalTests.cs +30 -0
  205. package/Tests/Runtime/Serialization/JsonConverterAdditionalTests.cs.meta +11 -0
  206. package/Tests/Runtime/Serialization/JsonConverterTests.cs +8 -12
  207. package/Tests/Runtime/Serialization/JsonRoundtripComprehensiveTests.cs +4 -9
  208. package/Tests/Runtime/Serialization/JsonSerializationTest.cs +16 -5
  209. package/Tests/Runtime/Serialization/ProtoRoundtripComprehensiveTests.cs +13 -13
  210. package/Tests/Runtime/Serialization/SerializerAdditionalTests.cs +12 -0
  211. package/Tests/Runtime/Serialization/SerializerFileIoTests.cs +105 -0
  212. package/Tests/Runtime/Serialization/SerializerFileIoTests.cs.meta +11 -0
  213. package/Tests/Runtime/Serialization/UnityEngineObjectJsonTests.cs +247 -0
  214. package/Tests/Runtime/Serialization/UnityEngineObjectJsonTests.cs.meta +11 -0
  215. package/Tests/Runtime/TestUtils/CommonTestBase.cs +99 -0
  216. package/Tests/Runtime/TestUtils/ReflexTestSupport.cs +111 -0
  217. package/Tests/Runtime/TestUtils/ReflexTestSupport.cs.meta +12 -0
  218. package/Tests/Runtime/Utils/CoroutineHandlerTests.cs +1 -1
  219. package/Tests/Runtime/Utils/LZMAComprehensiveTests.cs +1 -1
  220. package/Tests/Runtime/Utils/LZMATests.cs +1 -1
  221. package/Tests/Runtime/Utils/MatchColliderToSpriteTests.cs +5 -5
  222. package/Tests/Runtime/Visuals/EnhancedImageTests.cs +25 -56
  223. package/Tests/Runtime/Visuals/VisualsTestHelpers.cs +1 -8
  224. package/Tests/TestUtils.meta +8 -0
  225. package/package-lock.json.meta +7 -0
  226. package/package.json +13 -4
  227. package/scripts/check-eol.ps1 +4 -5
  228. package/scripts/lint-tests.ps1 +156 -0
  229. package/scripts/lint-tests.ps1.meta +7 -0
  230. package/scripts/normalize-eol.ps1 +6 -9
  231. package/.github/workflows/csharpier.yml +0 -135
  232. package/CHANGELOG.md +0 -0
  233. package/EFFECTS_SYSTEM.md +0 -242
  234. package/MATH_AND_EXTENSIONS.md +0 -316
  235. package/SPATIAL_TREE_2D_PERFORMANCE.md +0 -238
  236. package/SPATIAL_TREE_3D_PERFORMANCE.md +0 -240
  237. /package/{CHANGELOG.md.meta → Docs/CHANGELOG.md.meta} +0 -0
  238. /package/{DATA_STRUCTURES.md → Docs/DATA_STRUCTURES.md} +0 -0
  239. /package/{DATA_STRUCTURES.md.meta → Docs/DATA_STRUCTURES.md.meta} +0 -0
  240. /package/{EDITOR_TOOLS_GUIDE.md.meta → Docs/EDITOR_TOOLS_GUIDE.md.meta} +0 -0
  241. /package/{EFFECTS_SYSTEM.md.meta → Docs/EFFECTS_SYSTEM.md.meta} +0 -0
  242. /package/{EFFECTS_SYSTEM_TUTORIAL.md.meta → Docs/EFFECTS_SYSTEM_TUTORIAL.md.meta} +0 -0
  243. /package/{GETTING_STARTED.md.meta → Docs/GETTING_STARTED.md.meta} +0 -0
  244. /package/{GLOSSARY.md.meta → Docs/GLOSSARY.md.meta} +0 -0
  245. /package/{HULLS.md → Docs/HULLS.md} +0 -0
  246. /package/{HULLS.md.meta → Docs/HULLS.md.meta} +0 -0
  247. /package/{INDEX.md.meta → Docs/INDEX.md.meta} +0 -0
  248. /package/{LICENSE.md → Docs/LICENSE.md} +0 -0
  249. /package/{LICENSE.md.meta → Docs/LICENSE.md.meta} +0 -0
  250. /package/{MATH_AND_EXTENSIONS.md.meta → Docs/MATH_AND_EXTENSIONS.md.meta} +0 -0
  251. /package/{RANDOM_PERFORMANCE.md.meta → Docs/RANDOM_PERFORMANCE.md.meta} +0 -0
  252. /package/{REFLECTION_HELPERS.md → Docs/REFLECTION_HELPERS.md} +0 -0
  253. /package/{REFLECTION_HELPERS.md.meta → Docs/REFLECTION_HELPERS.md.meta} +0 -0
  254. /package/{RELATIONAL_COMPONENTS.md.meta → Docs/RELATIONAL_COMPONENTS.md.meta} +0 -0
  255. /package/{SERIALIZATION.md.meta → Docs/SERIALIZATION.md.meta} +0 -0
  256. /package/{SINGLETONS.md → Docs/SINGLETONS.md} +0 -0
  257. /package/{SINGLETONS.md.meta → Docs/SINGLETONS.md.meta} +0 -0
  258. /package/{SPATIAL_TREES_2D_GUIDE.md.meta → Docs/SPATIAL_TREES_2D_GUIDE.md.meta} +0 -0
  259. /package/{SPATIAL_TREES_3D_GUIDE.md.meta → Docs/SPATIAL_TREES_3D_GUIDE.md.meta} +0 -0
  260. /package/{SPATIAL_TREE_2D_PERFORMANCE.md.meta → Docs/SPATIAL_TREE_2D_PERFORMANCE.md.meta} +0 -0
  261. /package/{SPATIAL_TREE_3D_PERFORMANCE.md.meta → Docs/SPATIAL_TREE_3D_PERFORMANCE.md.meta} +0 -0
  262. /package/{SPATIAL_TREE_SEMANTICS.md → Docs/SPATIAL_TREE_SEMANTICS.md} +0 -0
  263. /package/{SPATIAL_TREE_SEMANTICS.md.meta → Docs/SPATIAL_TREE_SEMANTICS.md.meta} +0 -0
  264. /package/{THIRD_PARTY_NOTICES.md.meta → Docs/THIRD_PARTY_NOTICES.md.meta} +0 -0
@@ -3,7 +3,6 @@ namespace WallstopStudios.UnityHelpers.Editor
3
3
  #if UNITY_EDITOR
4
4
  using System;
5
5
  using System.Collections.Generic;
6
- using System.Linq;
7
6
  using System.Reflection;
8
7
  using UnityEditor;
9
8
  using UnityEngine;
@@ -36,7 +35,7 @@ namespace WallstopStudios.UnityHelpers.Editor
36
35
  /// </para>
37
36
  /// <para>
38
37
  /// - Uses <see cref="UnityEditor.TypeCache"/> to scan <see cref="MonoBehaviour"/> types and find
39
- /// viable event handlers via <see cref="Editor.Core.Helper.AnimationEventHelpers"/>. In
38
+ /// viable event handlers via <see cref="AnimationEventHelpers"/>. In
40
39
  /// Explicit Mode, only methods with <c>[AnimationEvent]</c> are included; it respects
41
40
  /// <c>ignoreDerived</c> to limit inherited exposure.
42
41
  /// </para>
@@ -116,21 +115,43 @@ namespace WallstopStudios.UnityHelpers.Editor
116
115
 
117
116
  private static void InitializeTypeCache()
118
117
  {
119
- Dictionary<Type, IReadOnlyList<MethodInfo>> typesToMethods = WallstopStudios
120
- .UnityHelpers.Core.Helper.ReflectionHelpers.GetTypesDerivedFrom<MonoBehaviour>(
118
+ Dictionary<Type, IReadOnlyList<MethodInfo>> typesToMethods = new();
119
+ IEnumerable<Type> types =
120
+ WallstopStudios.UnityHelpers.Core.Helper.ReflectionHelpers.GetTypesDerivedFrom<MonoBehaviour>(
121
121
  includeAbstract: false
122
- )
123
- .ToDictionary(
124
- type => type,
125
- type =>
126
- (IReadOnlyList<MethodInfo>)
127
- AnimationEventHelpers.GetPossibleAnimatorEventsForType(type)
128
122
  );
129
- foreach (KeyValuePair<Type, IReadOnlyList<MethodInfo>> entry in typesToMethods.ToList())
123
+ foreach (Type type in types)
130
124
  {
131
- if (entry.Value.Count <= 0)
125
+ if (type == null)
132
126
  {
133
- _ = typesToMethods.Remove(entry.Key);
127
+ continue;
128
+ }
129
+ List<MethodInfo> methods = AnimationEventHelpers.GetPossibleAnimatorEventsForType(
130
+ type
131
+ );
132
+ if (methods != null && methods.Count > 0)
133
+ {
134
+ typesToMethods[type] = methods;
135
+ }
136
+ }
137
+
138
+ using (
139
+ Buffers<KeyValuePair<Type, IReadOnlyList<MethodInfo>>>.List.Get(
140
+ out List<KeyValuePair<Type, IReadOnlyList<MethodInfo>>> snapshot
141
+ )
142
+ )
143
+ {
144
+ foreach (KeyValuePair<Type, IReadOnlyList<MethodInfo>> kvp in typesToMethods)
145
+ {
146
+ snapshot.Add(kvp);
147
+ }
148
+ for (int i = 0; i < snapshot.Count; i++)
149
+ {
150
+ KeyValuePair<Type, IReadOnlyList<MethodInfo>> entry = snapshot[i];
151
+ if (entry.Value == null || entry.Value.Count <= 0)
152
+ {
153
+ _ = typesToMethods.Remove(entry.Key);
154
+ }
134
155
  }
135
156
  }
136
157
 
@@ -427,17 +448,18 @@ namespace WallstopStudios.UnityHelpers.Editor
427
448
  || _lastAnimationSearch != _animationSearchString
428
449
  )
429
450
  {
430
- _filteredClips = FilterAnimationClips(
431
- _sourceAnimator.runtimeAnimatorController.animationClips.ToList()
432
- );
451
+ AnimationClip[] clips = _sourceAnimator.runtimeAnimatorController.animationClips;
452
+ _filteredClips = FilterAnimationClips(clips);
433
453
  _lastAnimationSearch = _animationSearchString;
434
454
  }
435
455
 
436
- int selectedIndex = EditorGUILayout.Popup(
437
- "Animation",
438
- _filteredClips.IndexOf(_currentClip),
439
- _filteredClips.Select(clip => clip.name).ToArray()
440
- );
456
+ int curIndex = _filteredClips.IndexOf(_currentClip);
457
+ string[] names = new string[_filteredClips.Count];
458
+ for (int i = 0; i < _filteredClips.Count; i++)
459
+ {
460
+ names[i] = _filteredClips[i] != null ? _filteredClips[i].name : string.Empty;
461
+ }
462
+ int selectedIndex = EditorGUILayout.Popup("Animation", curIndex, names);
441
463
 
442
464
  if (selectedIndex < 0)
443
465
  {
@@ -449,50 +471,67 @@ namespace WallstopStudios.UnityHelpers.Editor
449
471
  return _filteredClips[selectedIndex];
450
472
  }
451
473
 
452
- private List<AnimationClip> FilterAnimationClips(List<AnimationClip> clips)
474
+ private List<AnimationClip> FilterAnimationClips(AnimationClip[] clips)
453
475
  {
454
476
  if (
455
477
  string.IsNullOrEmpty(_animationSearchString)
456
478
  || string.Equals(_animationSearchString, "*", StringComparison.Ordinal)
457
479
  )
458
480
  {
459
- return clips;
481
+ return new List<AnimationClip>(clips);
460
482
  }
461
-
462
- List<string> searchTerms = _animationSearchString
463
- .Split(" ")
464
- .Select(searchPart => searchPart.ToLowerInvariant().Trim())
465
- .Where(trimmed =>
466
- !string.IsNullOrEmpty(trimmed)
467
- && !string.Equals(trimmed, "*", StringComparison.Ordinal)
468
- )
469
- .ToList();
470
-
471
- if (searchTerms.Count == 0)
483
+ string[] parts = _animationSearchString.Split(' ');
484
+ using (Buffers<string>.List.Get(out List<string> searchTerms))
472
485
  {
473
- return clips;
474
- }
475
-
476
- List<AnimationClip> filtered = new();
477
- foreach (AnimationClip clip in clips)
478
- {
479
- bool matches = true;
480
- foreach (string searchTerm in searchTerms)
486
+ for (int i = 0; i < parts.Length; i++)
481
487
  {
482
- if (!clip.name.ToLowerInvariant().Contains(searchTerm))
488
+ string s = parts[i];
489
+ if (string.IsNullOrEmpty(s))
483
490
  {
484
- matches = false;
485
- break;
491
+ continue;
492
+ }
493
+ s = s.Trim();
494
+ if (s.Length == 0 || s == "*")
495
+ {
496
+ continue;
486
497
  }
498
+ s = s.ToLowerInvariant();
499
+ searchTerms.Add(s);
487
500
  }
488
501
 
489
- if (matches || clip == _currentClip)
502
+ if (searchTerms.Count == 0)
490
503
  {
491
- filtered.Add(clip);
504
+ return new List<AnimationClip>(clips);
505
+ }
506
+
507
+ List<AnimationClip> filtered = new();
508
+ for (int ci = 0; ci < clips.Length; ci++)
509
+ {
510
+ AnimationClip clip = clips[ci];
511
+ if (clip == null)
512
+ {
513
+ continue;
514
+ }
515
+ bool matches = true;
516
+ string nameLower =
517
+ clip.name != null ? clip.name.ToLowerInvariant() : string.Empty;
518
+ for (int si = 0; si < searchTerms.Count; si++)
519
+ {
520
+ if (nameLower.IndexOf(searchTerms[si], StringComparison.Ordinal) < 0)
521
+ {
522
+ matches = false;
523
+ break;
524
+ }
525
+ }
526
+
527
+ if (matches || clip == _currentClip)
528
+ {
529
+ filtered.Add(clip);
530
+ }
492
531
  }
493
- }
494
532
 
495
- return filtered;
533
+ return filtered;
534
+ }
496
535
  }
497
536
 
498
537
  private int AnimationEventComparison(AnimationEventItem lhs, AnimationEventItem rhs)
@@ -520,12 +559,25 @@ namespace WallstopStudios.UnityHelpers.Editor
520
559
 
521
560
  private void DrawControlButtons()
522
561
  {
523
- if (
524
- _baseClipEvents.SequenceEqual(
525
- _state.Select(item => item.animationEvent),
526
- AnimationEventEqualityComparer.Instance
527
- ) && !_frameRateChanged
528
- )
562
+ bool equalLists = false;
563
+ if (_baseClipEvents.Count == _state.Count)
564
+ {
565
+ equalLists = true;
566
+ for (int i = 0; i < _baseClipEvents.Count; i++)
567
+ {
568
+ if (
569
+ !AnimationEventEqualityComparer.Instance.Equals(
570
+ _baseClipEvents[i],
571
+ _state[i].animationEvent
572
+ )
573
+ )
574
+ {
575
+ equalLists = false;
576
+ break;
577
+ }
578
+ }
579
+ }
580
+ if (equalLists && !_frameRateChanged)
529
581
  {
530
582
  GUILayout.Label("No changes detected...");
531
583
  return;
@@ -544,14 +596,21 @@ namespace WallstopStudios.UnityHelpers.Editor
544
596
  RefreshAnimationEvents();
545
597
  }
546
598
 
547
- if (
548
- !_state.SequenceEqual(
549
- _state.OrderBy(
550
- item => item.animationEvent,
551
- AnimationEventEqualityComparer.Instance
552
- )
599
+ bool outOfOrder = false;
600
+ for (int i = 1; i < _state.Count; i++)
601
+ {
602
+ if (
603
+ AnimationEventEqualityComparer.Instance.Compare(
604
+ _state[i - 1].animationEvent,
605
+ _state[i].animationEvent
606
+ ) > 0
553
607
  )
554
- )
608
+ {
609
+ outOfOrder = true;
610
+ break;
611
+ }
612
+ }
613
+ if (outOfOrder)
555
614
  {
556
615
  if (GUILayout.Button("Re-Order"))
557
616
  {
@@ -783,21 +842,38 @@ namespace WallstopStudios.UnityHelpers.Editor
783
842
  }
784
843
 
785
844
  AnimationEvent animEvent = item.animationEvent;
786
- foreach (
787
- KeyValuePair<Type, IReadOnlyList<MethodInfo>> entry in lookup.OrderBy(kvp =>
788
- kvp.Key.FullName
789
- )
790
- )
845
+ using (Buffers<Type>.List.Get(out List<Type> types))
791
846
  {
792
- foreach (MethodInfo method in entry.Value)
847
+ foreach (Type t in lookup.Keys)
793
848
  {
794
- if (
795
- string.Equals(method.Name, animEvent.functionName, StringComparison.Ordinal)
796
- )
849
+ types.Add(t);
850
+ }
851
+ types.Sort(
852
+ static (a, b) =>
853
+ string.Compare(a.FullName, b.FullName, StringComparison.Ordinal)
854
+ );
855
+ for (int ti = 0; ti < types.Count; ti++)
856
+ {
857
+ Type type = types[ti];
858
+ if (!lookup.TryGetValue(type, out IReadOnlyList<MethodInfo> methods))
797
859
  {
798
- item.selectedType = entry.Key;
799
- item.selectedMethod = method;
800
- return;
860
+ continue;
861
+ }
862
+ for (int mi = 0; mi < methods.Count; mi++)
863
+ {
864
+ MethodInfo method = methods[mi];
865
+ if (
866
+ string.Equals(
867
+ method.Name,
868
+ animEvent.functionName,
869
+ StringComparison.Ordinal
870
+ )
871
+ )
872
+ {
873
+ item.selectedType = type;
874
+ item.selectedMethod = method;
875
+ return;
876
+ }
801
877
  }
802
878
  }
803
879
  }
@@ -818,62 +894,129 @@ namespace WallstopStudios.UnityHelpers.Editor
818
894
  }
819
895
 
820
896
  // Get all types, but prioritize the selected one and filter by search
821
- List<Type> allTypes = lookup.Keys.OrderBy(type => type.FullName).ToList();
822
- List<Type> filteredTypes = allTypes;
823
-
824
- // Apply type search filter
825
- if (!string.IsNullOrEmpty(item.typeSearch))
897
+ List<Type> allTypes;
898
+ using (Buffers<Type>.List.Get(out allTypes))
899
+ using (Buffers<Type>.List.Get(out List<Type> filteredTypes))
826
900
  {
827
- string searchLower = item.typeSearch.ToLowerInvariant();
828
- filteredTypes = allTypes
829
- .Where(t =>
830
- t.FullName != null && t.FullName.ToLowerInvariant().Contains(searchLower)
831
- )
832
- .ToList();
901
+ foreach (Type t in lookup.Keys)
902
+ {
903
+ allTypes.Add(t);
904
+ }
905
+ allTypes.Sort(
906
+ static (a, b) =>
907
+ string.Compare(a.FullName, b.FullName, StringComparison.Ordinal)
908
+ );
909
+ for (int i = 0; i < allTypes.Count; i++)
910
+ {
911
+ filteredTypes.Add(allTypes[i]);
912
+ }
833
913
 
834
- // Always include selected type even if it doesn't match search
835
- if (item.selectedType != null && !filteredTypes.Contains(item.selectedType))
914
+ // Apply type search filter
915
+ if (!string.IsNullOrEmpty(item.typeSearch))
836
916
  {
837
- filteredTypes.Insert(0, item.selectedType);
917
+ string searchLower = item.typeSearch.ToLowerInvariant();
918
+ filteredTypes.Clear();
919
+ for (int i = 0; i < allTypes.Count; i++)
920
+ {
921
+ Type t = allTypes[i];
922
+ string full = t.FullName ?? string.Empty;
923
+ string low = full.ToLowerInvariant();
924
+ if (low.IndexOf(searchLower, StringComparison.Ordinal) >= 0)
925
+ {
926
+ filteredTypes.Add(t);
927
+ }
928
+ }
929
+
930
+ // Always include selected type even if it doesn't match search
931
+ if (item.selectedType != null)
932
+ {
933
+ bool present = false;
934
+ for (int i = 0; i < filteredTypes.Count; i++)
935
+ {
936
+ if (filteredTypes[i] == item.selectedType)
937
+ {
938
+ present = true;
939
+ break;
940
+ }
941
+ }
942
+ if (!present)
943
+ {
944
+ filteredTypes.Insert(0, item.selectedType);
945
+ }
946
+ }
838
947
  }
839
- }
840
948
 
841
- // Limit to reasonable number, but show more if searching
842
- int limit = string.IsNullOrEmpty(item.typeSearch) ? 50 : 200;
843
- List<Type> displayTypes = filteredTypes.Take(limit).ToList();
949
+ // Limit to reasonable number, but show more if searching
950
+ int limit = string.IsNullOrEmpty(item.typeSearch) ? 50 : 200;
951
+ using (Buffers<Type>.List.Get(out List<Type> displayTypes))
952
+ {
953
+ int take = filteredTypes.Count > limit ? limit : filteredTypes.Count;
954
+ for (int i = 0; i < take; i++)
955
+ {
956
+ displayTypes.Add(filteredTypes[i]);
957
+ }
844
958
 
845
- if (item.selectedType != null && !displayTypes.Contains(item.selectedType))
846
- {
847
- displayTypes.Insert(0, item.selectedType);
848
- }
959
+ if (item.selectedType != null)
960
+ {
961
+ bool found = false;
962
+ for (int i = 0; i < displayTypes.Count; i++)
963
+ {
964
+ if (displayTypes[i] == item.selectedType)
965
+ {
966
+ found = true;
967
+ break;
968
+ }
969
+ }
970
+ if (!found)
971
+ {
972
+ displayTypes.Insert(0, item.selectedType);
973
+ }
974
+ }
849
975
 
850
- string[] orderedTypeNames = displayTypes.Select(type => type.FullName).ToArray();
976
+ string[] orderedTypeNames = new string[displayTypes.Count];
977
+ for (int i = 0; i < displayTypes.Count; i++)
978
+ {
979
+ Type t = displayTypes[i];
980
+ orderedTypeNames[i] =
981
+ t != null ? (t.FullName ?? string.Empty) : string.Empty;
982
+ }
851
983
 
852
- int existingIndex = displayTypes.IndexOf(item.selectedType);
984
+ int existingIndex = -1;
985
+ for (int i = 0; i < displayTypes.Count; i++)
986
+ {
987
+ if (displayTypes[i] == item.selectedType)
988
+ {
989
+ existingIndex = i;
990
+ break;
991
+ }
992
+ }
853
993
 
854
- EditorGUI.BeginChangeCheck();
855
- int selectedTypeIndex = EditorGUILayout.Popup(
856
- "TypeName",
857
- existingIndex,
858
- orderedTypeNames
859
- );
994
+ EditorGUI.BeginChangeCheck();
995
+ int selectedTypeIndex = EditorGUILayout.Popup(
996
+ "TypeName",
997
+ existingIndex,
998
+ orderedTypeNames
999
+ );
860
1000
 
861
- if (EditorGUI.EndChangeCheck())
862
- {
863
- RecordUndo("Change Animation Event Type");
864
- item.selectedType = selectedTypeIndex < 0 ? null : displayTypes[selectedTypeIndex];
865
- item.selectedMethod = null;
866
- }
1001
+ if (EditorGUI.EndChangeCheck())
1002
+ {
1003
+ RecordUndo("Change Animation Event Type");
1004
+ item.selectedType =
1005
+ selectedTypeIndex < 0 ? null : displayTypes[selectedTypeIndex];
1006
+ item.selectedMethod = null;
1007
+ }
867
1008
 
868
- if (filteredTypes.Count > limit)
869
- {
870
- EditorGUILayout.HelpBox(
871
- $"Showing {limit} of {filteredTypes.Count} types. Use Type Search to filter.",
872
- MessageType.Info
873
- );
874
- }
1009
+ if (filteredTypes.Count > limit)
1010
+ {
1011
+ EditorGUILayout.HelpBox(
1012
+ $"Showing {limit} of {filteredTypes.Count} types. Use Type Search to filter.",
1013
+ MessageType.Info
1014
+ );
1015
+ }
875
1016
 
876
- return item.selectedType != null;
1017
+ return item.selectedType != null;
1018
+ }
1019
+ }
877
1020
  }
878
1021
 
879
1022
  private bool SelectMethods(
@@ -892,7 +1035,7 @@ namespace WallstopStudios.UnityHelpers.Editor
892
1035
  methods = new List<MethodInfo>(0);
893
1036
  }
894
1037
 
895
- List<MethodInfo> methodsList = methods.ToList();
1038
+ List<MethodInfo> methodsList = new(methods);
896
1039
 
897
1040
  if (item.selectedMethod == null || !methodsList.Contains(item.selectedMethod))
898
1041
  {
@@ -914,11 +1057,21 @@ namespace WallstopStudios.UnityHelpers.Editor
914
1057
  }
915
1058
 
916
1059
  EditorGUI.BeginChangeCheck();
917
- int selectedMethodIndex = EditorGUILayout.Popup(
918
- "MethodName",
919
- methodsList.IndexOf(item.selectedMethod),
920
- methodsList.Select(method => method.Name).ToArray()
921
- );
1060
+ int curIndex = -1;
1061
+ for (int i = 0; i < methodsList.Count; i++)
1062
+ {
1063
+ if (methodsList[i] == item.selectedMethod)
1064
+ {
1065
+ curIndex = i;
1066
+ break;
1067
+ }
1068
+ }
1069
+ string[] methodNames = new string[methodsList.Count];
1070
+ for (int i = 0; i < methodsList.Count; i++)
1071
+ {
1072
+ methodNames[i] = methodsList[i] != null ? methodsList[i].Name : string.Empty;
1073
+ }
1074
+ int selectedMethodIndex = EditorGUILayout.Popup("MethodName", curIndex, methodNames);
922
1075
 
923
1076
  if (EditorGUI.EndChangeCheck() && selectedMethodIndex >= 0)
924
1077
  {
@@ -953,12 +1106,11 @@ namespace WallstopStudios.UnityHelpers.Editor
953
1106
  else if (paramType.BaseType == typeof(Enum))
954
1107
  {
955
1108
  string[] enumNamesArray = Enum.GetNames(paramType);
956
- List<string> enumNames = enumNamesArray.ToList();
957
1109
  string enumName = Enum.GetName(paramType, animEvent.intParameter);
958
-
1110
+ int curIndex = Array.IndexOf(enumNamesArray, enumName);
959
1111
  int index = EditorGUILayout.Popup(
960
1112
  $"{paramType.Name}",
961
- enumNames.IndexOf(enumName),
1113
+ curIndex,
962
1114
  enumNamesArray
963
1115
  );
964
1116
 
@@ -966,7 +1118,7 @@ namespace WallstopStudios.UnityHelpers.Editor
966
1118
  if (checkEnded && index >= 0)
967
1119
  {
968
1120
  RecordUndo("Change Animation Event Parameter");
969
- animEvent.intParameter = (int)Enum.Parse(paramType, enumNames[index]);
1121
+ animEvent.intParameter = (int)Enum.Parse(paramType, enumNamesArray[index]);
970
1122
  }
971
1123
 
972
1124
  item.overrideEnumValues = EditorGUILayout.Toggle(
@@ -1050,23 +1202,43 @@ namespace WallstopStudios.UnityHelpers.Editor
1050
1202
 
1051
1203
  Dictionary<Type, List<MethodInfo>> filtered = new();
1052
1204
 
1053
- List<string> methodSearchTerms = item
1054
- .search.Split(" ")
1055
- .Select(searchTerm => searchTerm.Trim().ToLowerInvariant())
1056
- .Where(trimmed =>
1057
- !string.IsNullOrEmpty(trimmed)
1058
- && !string.Equals(trimmed, "*", StringComparison.Ordinal)
1059
- )
1060
- .ToList();
1061
-
1062
- List<string> typeSearchTerms = item
1063
- .typeSearch.Split(" ")
1064
- .Select(searchTerm => searchTerm.Trim().ToLowerInvariant())
1065
- .Where(trimmed =>
1066
- !string.IsNullOrEmpty(trimmed)
1067
- && !string.Equals(trimmed, "*", StringComparison.Ordinal)
1068
- )
1069
- .ToList();
1205
+ List<string> methodSearchTerms = new();
1206
+ {
1207
+ string[] parts = item.search.Split(' ');
1208
+ for (int i = 0; i < parts.Length; i++)
1209
+ {
1210
+ string s = parts[i];
1211
+ if (string.IsNullOrEmpty(s))
1212
+ {
1213
+ continue;
1214
+ }
1215
+ s = s.Trim();
1216
+ if (s.Length == 0 || s == "*")
1217
+ {
1218
+ continue;
1219
+ }
1220
+ methodSearchTerms.Add(s.ToLowerInvariant());
1221
+ }
1222
+ }
1223
+
1224
+ List<string> typeSearchTerms = new();
1225
+ {
1226
+ string[] parts = item.typeSearch.Split(' ');
1227
+ for (int i = 0; i < parts.Length; i++)
1228
+ {
1229
+ string s = parts[i];
1230
+ if (string.IsNullOrEmpty(s))
1231
+ {
1232
+ continue;
1233
+ }
1234
+ s = s.Trim();
1235
+ if (s.Length == 0 || s == "*")
1236
+ {
1237
+ continue;
1238
+ }
1239
+ typeSearchTerms.Add(s.ToLowerInvariant());
1240
+ }
1241
+ }
1070
1242
 
1071
1243
  foreach (KeyValuePair<Type, IReadOnlyList<MethodInfo>> kvp in Lookup)
1072
1244
  {
@@ -1091,7 +1263,7 @@ namespace WallstopStudios.UnityHelpers.Editor
1091
1263
  }
1092
1264
  }
1093
1265
 
1094
- List<MethodInfo> methodList = kvp.Value.ToList();
1266
+ List<MethodInfo> methodList = new(kvp.Value);
1095
1267
 
1096
1268
  // Filter by method search
1097
1269
  if (methodSearchTerms.Count > 0)
@@ -1126,10 +1298,12 @@ namespace WallstopStudios.UnityHelpers.Editor
1126
1298
  }
1127
1299
  }
1128
1300
 
1129
- item.cachedLookup = lookup = filtered.ToDictionary(
1130
- kvp => kvp.Key,
1131
- kvp => (IReadOnlyList<MethodInfo>)kvp.Value
1132
- );
1301
+ Dictionary<Type, IReadOnlyList<MethodInfo>> ro = new();
1302
+ foreach (KeyValuePair<Type, List<MethodInfo>> e in filtered)
1303
+ {
1304
+ ro[e.Key] = e.Value;
1305
+ }
1306
+ item.cachedLookup = lookup = ro;
1133
1307
  item.lastSearchForCache = currentSearch;
1134
1308
  }
1135
1309
  else
@@ -1321,12 +1495,13 @@ namespace WallstopStudios.UnityHelpers.Editor
1321
1495
  }
1322
1496
 
1323
1497
  _selectedFrameIndex = MaxFrameIndex;
1324
- _referenceCurve = AnimationUtility
1325
- .GetObjectReferenceCurve(
1326
- _currentClip,
1327
- EditorCurveBinding.PPtrCurve("", typeof(SpriteRenderer), "m_Sprite")
1328
- )
1329
- .ToList();
1498
+ ObjectReferenceKeyframe[] curve = AnimationUtility.GetObjectReferenceCurve(
1499
+ _currentClip,
1500
+ EditorCurveBinding.PPtrCurve("", typeof(SpriteRenderer), "m_Sprite")
1501
+ );
1502
+ _referenceCurve = new List<ObjectReferenceKeyframe>(
1503
+ curve ?? Array.Empty<ObjectReferenceKeyframe>()
1504
+ );
1330
1505
  _referenceCurve.Sort(
1331
1506
  (lhs, rhs) =>
1332
1507
  {
@@ -1356,10 +1531,12 @@ namespace WallstopStudios.UnityHelpers.Editor
1356
1531
  {
1357
1532
  Undo.RecordObject(_currentClip, "Save Animation Events");
1358
1533
 
1359
- AnimationUtility.SetAnimationEvents(
1360
- _currentClip,
1361
- _state.Select(item => item.animationEvent).ToArray()
1362
- );
1534
+ AnimationEvent[] arr = new AnimationEvent[_state.Count];
1535
+ for (int i = 0; i < _state.Count; i++)
1536
+ {
1537
+ arr[i] = _state[i].animationEvent;
1538
+ }
1539
+ AnimationUtility.SetAnimationEvents(_currentClip, arr);
1363
1540
 
1364
1541
  // Apply frame rate changes if any
1365
1542
  if (_frameRateChanged)