com.wallstop-studios.dxmessaging 2.2.0 → 3.1.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.
Files changed (270) hide show
  1. package/CHANGELOG.md +315 -67
  2. package/CHANGELOG.md.meta +7 -7
  3. package/Editor/Analyzers/BaseCallIlInspector.cs +277 -0
  4. package/Editor/Analyzers/BaseCallIlInspector.cs.meta +11 -0
  5. package/Editor/Analyzers/BaseCallLogMessageParser.cs +295 -0
  6. package/Editor/Analyzers/BaseCallLogMessageParser.cs.meta +11 -0
  7. package/Editor/Analyzers/BaseCallReportAggregator.cs +308 -0
  8. package/Editor/Analyzers/BaseCallReportAggregator.cs.meta +11 -0
  9. package/Editor/Analyzers/BaseCallTypeScanner.cs +110 -0
  10. package/Editor/Analyzers/BaseCallTypeScanner.cs.meta +11 -0
  11. package/Editor/Analyzers/BaseCallTypeScannerCore.cs +562 -0
  12. package/Editor/Analyzers/BaseCallTypeScannerCore.cs.meta +11 -0
  13. package/Editor/Analyzers/DxMessagingConsoleHarvester.cs +1129 -0
  14. package/Editor/Analyzers/DxMessagingConsoleHarvester.cs.meta +11 -0
  15. package/Editor/Analyzers/Microsoft.CodeAnalysis.CSharp.dll.meta +44 -44
  16. package/Editor/Analyzers/Microsoft.CodeAnalysis.dll.meta +44 -44
  17. package/Editor/Analyzers/System.Collections.Immutable.dll.meta +44 -44
  18. package/Editor/Analyzers/System.Reflection.Metadata.dll.meta +44 -44
  19. package/Editor/Analyzers/System.Runtime.CompilerServices.Unsafe.dll.meta +44 -44
  20. package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll +0 -0
  21. package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll.meta +46 -0
  22. package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll +0 -0
  23. package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll.meta +72 -72
  24. package/Editor/Analyzers.meta +8 -8
  25. package/Editor/AssemblyInfo.cs.meta +11 -3
  26. package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs +81 -0
  27. package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs.meta +11 -0
  28. package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs +429 -0
  29. package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs.meta +11 -0
  30. package/Editor/CustomEditors/MessagingComponentEditor.cs +1 -1
  31. package/Editor/CustomEditors/MessagingComponentEditor.cs.meta +11 -3
  32. package/Editor/CustomEditors.meta +2 -2
  33. package/Editor/DxMessagingEditorIdle.cs +62 -0
  34. package/Editor/DxMessagingEditorIdle.cs.meta +11 -0
  35. package/Editor/DxMessagingEditorInitializer.cs +112 -15
  36. package/Editor/DxMessagingEditorInitializer.cs.meta +11 -3
  37. package/Editor/DxMessagingEditorLog.cs +32 -0
  38. package/Editor/DxMessagingEditorLog.cs.meta +11 -0
  39. package/Editor/DxMessagingMenu.cs.meta +11 -11
  40. package/Editor/DxMessagingSceneBuildProcessor.cs.meta +11 -11
  41. package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs +313 -0
  42. package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs.meta +11 -0
  43. package/Editor/Settings/DxMessagingSettings.cs +261 -11
  44. package/Editor/Settings/DxMessagingSettings.cs.meta +11 -3
  45. package/Editor/Settings/DxMessagingSettingsProvider.cs +50 -33
  46. package/Editor/Settings/DxMessagingSettingsProvider.cs.meta +11 -3
  47. package/Editor/Settings.meta +2 -2
  48. package/Editor/SetupCscRsp.cs +406 -39
  49. package/Editor/SetupCscRsp.cs.meta +11 -3
  50. package/Editor/Testing/MessagingComponentEditorHarness.cs +2 -2
  51. package/Editor/Testing/MessagingComponentEditorHarness.cs.meta +11 -3
  52. package/Editor/Testing.meta +3 -3
  53. package/Editor/WallstopStudios.DxMessaging.Editor.asmdef +14 -14
  54. package/Editor/WallstopStudios.DxMessaging.Editor.asmdef.meta +7 -7
  55. package/Editor.meta +8 -8
  56. package/LICENSE.md +9 -9
  57. package/LICENSE.md.meta +7 -7
  58. package/README.md +940 -900
  59. package/README.md.meta +7 -7
  60. package/Runtime/AssemblyInfo.cs +4 -0
  61. package/Runtime/AssemblyInfo.cs.meta +11 -3
  62. package/Runtime/Core/Attributes/DxAutoConstructorAttribute.cs.meta +11 -3
  63. package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +11 -3
  64. package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs +26 -0
  65. package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs.meta +11 -0
  66. package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs +2 -4
  67. package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs.meta +11 -3
  68. package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +11 -3
  69. package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +11 -3
  70. package/Runtime/Core/Attributes/Il2CppSetOptionAttribute.cs +56 -0
  71. package/Runtime/Core/Attributes/Il2CppSetOptionAttribute.cs.meta +11 -0
  72. package/Runtime/Core/Attributes.meta +2 -2
  73. package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs +195 -0
  74. package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs.meta +11 -0
  75. package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs +179 -0
  76. package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs.meta +11 -0
  77. package/Runtime/Core/Configuration.meta +9 -0
  78. package/Runtime/Core/DataStructure/CyclicBuffer.cs +46 -28
  79. package/Runtime/Core/DataStructure/CyclicBuffer.cs.meta +11 -3
  80. package/Runtime/Core/DataStructure.meta +2 -2
  81. package/Runtime/Core/Diagnostics/MessageEmissionData.cs.meta +11 -3
  82. package/Runtime/Core/Diagnostics/MessageRegistrationData.cs.meta +11 -3
  83. package/Runtime/Core/Diagnostics/MessageRegistrationType.cs.meta +11 -3
  84. package/Runtime/Core/Diagnostics.meta +2 -2
  85. package/Runtime/Core/DxMessagingStaticState.cs +19 -0
  86. package/Runtime/Core/DxMessagingStaticState.cs.meta +11 -11
  87. package/Runtime/Core/Extensions/EnumExtensions.cs +6 -5
  88. package/Runtime/Core/Extensions/EnumExtensions.cs.meta +11 -3
  89. package/Runtime/Core/Extensions/IListExtensions.cs.meta +11 -3
  90. package/Runtime/Core/Extensions/MessageBusExtensions.cs.meta +12 -12
  91. package/Runtime/Core/Extensions/MessageExtensions.cs +0 -60
  92. package/Runtime/Core/Extensions/MessageExtensions.cs.meta +11 -11
  93. package/Runtime/Core/Extensions.meta +8 -8
  94. package/Runtime/Core/Helper/MessageCache.cs +32 -0
  95. package/Runtime/Core/Helper/MessageCache.cs.meta +11 -3
  96. package/Runtime/Core/Helper/MessageHelperIndexer.cs.meta +11 -3
  97. package/Runtime/Core/Helper.meta +2 -2
  98. package/Runtime/Core/IMessage.cs +3 -3
  99. package/Runtime/Core/IMessage.cs.meta +11 -11
  100. package/Runtime/Core/InstanceId.cs +25 -1
  101. package/Runtime/Core/InstanceId.cs.meta +11 -11
  102. package/Runtime/Core/Internal/DxUnsafe.cs +60 -0
  103. package/Runtime/Core/Internal/DxUnsafe.cs.meta +11 -0
  104. package/Runtime/Core/Internal/FlatDispatch.cs +198 -0
  105. package/Runtime/Core/Internal/FlatDispatch.cs.meta +11 -0
  106. package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs +38 -0
  107. package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs.meta +11 -0
  108. package/Runtime/Core/Internal/TypedSlotIndex.cs +81 -0
  109. package/Runtime/Core/Internal/TypedSlotIndex.cs.meta +11 -0
  110. package/Runtime/Core/Internal/TypedSlots.cs +597 -0
  111. package/Runtime/Core/Internal/TypedSlots.cs.meta +11 -0
  112. package/Runtime/Core/Internal.meta +9 -0
  113. package/Runtime/Core/MessageBus/DiagnosticsTarget.cs.meta +11 -11
  114. package/Runtime/Core/MessageBus/GlobalMessageBusProvider.cs.meta +11 -11
  115. package/Runtime/Core/MessageBus/IMessageBus.cs +189 -15
  116. package/Runtime/Core/MessageBus/IMessageBus.cs.meta +11 -11
  117. package/Runtime/Core/MessageBus/IMessageBusProvider.cs.meta +11 -11
  118. package/Runtime/Core/MessageBus/IMessageRegistrationBuilder.cs +1 -0
  119. package/Runtime/Core/MessageBus/IMessageRegistrationBuilder.cs.meta +11 -11
  120. package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs +16 -0
  121. package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs.meta +11 -0
  122. package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs +40 -0
  123. package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs.meta +11 -0
  124. package/Runtime/Core/MessageBus/Internal/BusSlots.cs +719 -0
  125. package/Runtime/Core/MessageBus/Internal/BusSlots.cs.meta +11 -0
  126. package/Runtime/Core/MessageBus/Internal/DispatchKind.cs +38 -0
  127. package/Runtime/Core/MessageBus/Internal/DispatchKind.cs.meta +11 -0
  128. package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs +20 -0
  129. package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs.meta +11 -0
  130. package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs +28 -0
  131. package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs.meta +11 -0
  132. package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs +48 -0
  133. package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs.meta +11 -0
  134. package/Runtime/Core/MessageBus/Internal/ISweepable.cs +15 -0
  135. package/Runtime/Core/MessageBus/Internal/ISweepable.cs.meta +11 -0
  136. package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs +222 -0
  137. package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs.meta +11 -0
  138. package/Runtime/Core/MessageBus/Internal/SlotKey.cs +192 -0
  139. package/Runtime/Core/MessageBus/Internal/SlotKey.cs.meta +11 -0
  140. package/Runtime/Core/MessageBus/Internal.meta +9 -0
  141. package/Runtime/Core/MessageBus/MessageBus.cs +5366 -3838
  142. package/Runtime/Core/MessageBus/MessageBus.cs.meta +11 -11
  143. package/Runtime/Core/MessageBus/MessageBusRebindMode.cs.meta +11 -11
  144. package/Runtime/Core/MessageBus/MessageRegistrationBuilder.cs +187 -14
  145. package/Runtime/Core/MessageBus/MessageRegistrationBuilder.cs.meta +11 -11
  146. package/Runtime/Core/MessageBus/MessagingRegistration.cs.meta +11 -11
  147. package/Runtime/Core/MessageBus/RegistrationLog.cs.meta +11 -11
  148. package/Runtime/Core/MessageBus.meta +8 -8
  149. package/Runtime/Core/MessageHandler.cs +2399 -1042
  150. package/Runtime/Core/MessageHandler.cs.meta +11 -11
  151. package/Runtime/Core/MessageRegistrationHandle.cs.meta +11 -11
  152. package/Runtime/Core/MessageRegistrationToken.cs +429 -44
  153. package/Runtime/Core/MessageRegistrationToken.cs.meta +11 -11
  154. package/Runtime/Core/Messages/GlobalStringMessage.cs.meta +11 -3
  155. package/Runtime/Core/Messages/IBroadcastMessage.cs.meta +11 -11
  156. package/Runtime/Core/Messages/ITargetedMessage.cs.meta +11 -11
  157. package/Runtime/Core/Messages/IUntargetedMessage.cs.meta +11 -11
  158. package/Runtime/Core/Messages/ReflexiveMessage.cs.meta +11 -3
  159. package/Runtime/Core/Messages/SourcedStringMessage.cs.meta +11 -11
  160. package/Runtime/Core/Messages/StringMessage.cs.meta +11 -3
  161. package/Runtime/Core/Messages.meta +8 -8
  162. package/Runtime/Core/MessagingDebug.cs.meta +11 -11
  163. package/Runtime/Core/Pooling/CollectionPool.cs +266 -0
  164. package/Runtime/Core/Pooling/CollectionPool.cs.meta +11 -0
  165. package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs +30 -0
  166. package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs.meta +11 -0
  167. package/Runtime/Core/Pooling/DxPools.cs +157 -0
  168. package/Runtime/Core/Pooling/DxPools.cs.meta +11 -0
  169. package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs +106 -0
  170. package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs.meta +11 -0
  171. package/Runtime/Core/Pooling/IDxMessagingClock.cs +18 -0
  172. package/Runtime/Core/Pooling/IDxMessagingClock.cs.meta +11 -0
  173. package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs +55 -0
  174. package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs.meta +11 -0
  175. package/Runtime/Core/Pooling/StopwatchClock.cs +27 -0
  176. package/Runtime/Core/Pooling/StopwatchClock.cs.meta +11 -0
  177. package/Runtime/Core/Pooling/UnityRealtimeClock.cs +31 -0
  178. package/Runtime/Core/Pooling/UnityRealtimeClock.cs.meta +11 -0
  179. package/Runtime/Core/Pooling.meta +9 -0
  180. package/Runtime/Core.meta +8 -8
  181. package/Runtime/Unity/CurrentGlobalMessageBusProvider.cs.meta +12 -12
  182. package/Runtime/Unity/DxMessagingRuntimeInitializer.cs.meta +11 -11
  183. package/Runtime/Unity/InitialGlobalMessageBusProvider.cs.meta +12 -12
  184. package/Runtime/Unity/Integrations/Reflex/AssemblyInfo.cs.meta +11 -3
  185. package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs +73 -0
  186. package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs.meta +11 -11
  187. package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef +20 -20
  188. package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef.meta +7 -7
  189. package/Runtime/Unity/Integrations/Reflex.meta +8 -8
  190. package/Runtime/Unity/Integrations/VContainer/AssemblyInfo.cs.meta +11 -3
  191. package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs +109 -1
  192. package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs.meta +11 -11
  193. package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef +30 -30
  194. package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef.meta +7 -7
  195. package/Runtime/Unity/Integrations/VContainer.meta +8 -8
  196. package/Runtime/Unity/Integrations/Zenject/AssemblyInfo.cs.meta +11 -3
  197. package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef +30 -30
  198. package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef.meta +7 -7
  199. package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs +79 -1
  200. package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs.meta +11 -11
  201. package/Runtime/Unity/Integrations/Zenject.meta +8 -8
  202. package/Runtime/Unity/Integrations.meta +8 -8
  203. package/Runtime/Unity/MessageAwareComponent.cs +74 -0
  204. package/Runtime/Unity/MessageAwareComponent.cs.meta +11 -11
  205. package/Runtime/Unity/MessageBusProviderHandle.cs.meta +12 -12
  206. package/Runtime/Unity/MessagingComponent.cs +43 -10
  207. package/Runtime/Unity/MessagingComponent.cs.meta +11 -11
  208. package/Runtime/Unity/MessagingComponentInstaller.cs.meta +12 -12
  209. package/Runtime/Unity/ScriptableMessageBusProvider.cs.meta +12 -12
  210. package/Runtime/Unity.meta +8 -8
  211. package/Runtime/WallstopStudios.DxMessaging.asmdef +14 -14
  212. package/Runtime/WallstopStudios.DxMessaging.asmdef.meta +7 -7
  213. package/Runtime.meta +8 -8
  214. package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab +98 -98
  215. package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab.meta +7 -7
  216. package/Samples~/DI/Prefabs.meta +8 -8
  217. package/Samples~/DI/Providers/GlobalMessageBusProvider.asset +14 -14
  218. package/Samples~/DI/Providers/GlobalMessageBusProvider.asset.meta +8 -8
  219. package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset +14 -14
  220. package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset.meta +8 -8
  221. package/Samples~/DI/Providers.meta +8 -8
  222. package/Samples~/DI/README.md +51 -51
  223. package/Samples~/DI/README.md.meta +7 -7
  224. package/Samples~/DI/Reflex/SampleInstaller.cs +7 -0
  225. package/Samples~/DI/Reflex/SampleInstaller.cs.meta +11 -11
  226. package/Samples~/DI/Reflex.meta +8 -8
  227. package/Samples~/DI/VContainer/SampleLifetimeScope.cs +6 -1
  228. package/Samples~/DI/VContainer/SampleLifetimeScope.cs.meta +11 -11
  229. package/Samples~/DI/VContainer.meta +8 -8
  230. package/Samples~/DI/Zenject/SampleInstaller.cs +8 -0
  231. package/Samples~/DI/Zenject/SampleInstaller.cs.meta +11 -11
  232. package/Samples~/DI/Zenject.meta +8 -8
  233. package/Samples~/DI.meta +8 -8
  234. package/Samples~/Mini Combat/Boot.cs.meta +11 -11
  235. package/Samples~/Mini Combat/Enemy.cs.meta +11 -11
  236. package/Samples~/Mini Combat/Messages.cs.meta +11 -11
  237. package/Samples~/Mini Combat/Player.cs.meta +11 -11
  238. package/Samples~/Mini Combat/README.md +324 -323
  239. package/Samples~/Mini Combat/README.md.meta +7 -7
  240. package/Samples~/Mini Combat/UIOverlay.cs.meta +11 -11
  241. package/Samples~/Mini Combat/Walkthrough.md +430 -430
  242. package/Samples~/Mini Combat/Walkthrough.md.meta +7 -7
  243. package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef +13 -13
  244. package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef.meta +7 -7
  245. package/Samples~/Mini Combat.meta +8 -8
  246. package/Samples~/UI Buttons + Inspector/DiagnosticsEnabler.cs.meta +11 -11
  247. package/Samples~/UI Buttons + Inspector/Messages.cs.meta +11 -11
  248. package/Samples~/UI Buttons + Inspector/MessagingObserver.cs.meta +11 -11
  249. package/Samples~/UI Buttons + Inspector/README.md +210 -209
  250. package/Samples~/UI Buttons + Inspector/README.md.meta +7 -7
  251. package/Samples~/UI Buttons + Inspector/UIButtonEmitter.cs.meta +11 -11
  252. package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef +13 -13
  253. package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef.meta +7 -7
  254. package/Samples~/UI Buttons + Inspector.meta +8 -8
  255. package/SourceGenerators/Directory.Build.props +50 -3
  256. package/SourceGenerators/Directory.Build.props.meta +7 -7
  257. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs +96 -63
  258. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs.meta +11 -11
  259. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs +745 -87
  260. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs.meta +11 -3
  261. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj +39 -46
  262. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj.meta +7 -7
  263. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.meta +8 -8
  264. package/SourceGenerators/global.json +7 -0
  265. package/SourceGenerators/global.json.meta +7 -0
  266. package/SourceGenerators.meta +8 -8
  267. package/Third Party Notices.md +3 -3
  268. package/Third Party Notices.md.meta +7 -7
  269. package/package.json +102 -92
  270. package/package.json.meta +7 -7
@@ -1,6 +1,7 @@
1
1
  namespace DxMessaging.Editor.Settings
2
2
  {
3
3
  #if UNITY_EDITOR
4
+ using System.Collections.Generic;
4
5
  using System.Linq;
5
6
  using Core.MessageBus;
6
7
  using UnityEditor;
@@ -24,7 +25,7 @@ namespace DxMessaging.Editor.Settings
24
25
  [SerializeField]
25
26
  [HideInInspector]
26
27
  [FormerlySerializedAs("_enableDiagnosticsInEditor")]
27
- private bool _legacyEnableDiagnosticsInEditor;
28
+ internal bool _legacyEnableDiagnosticsInEditor;
28
29
 
29
30
  [SerializeField]
30
31
  internal int _messageBufferSize = IMessageBus.DefaultMessageBufferSize;
@@ -32,13 +33,26 @@ namespace DxMessaging.Editor.Settings
32
33
  [SerializeField]
33
34
  internal bool _suppressDomainReloadWarning = true;
34
35
 
36
+ [SerializeField]
37
+ internal List<string> _baseCallIgnoredTypes = new();
38
+
39
+ [SerializeField]
40
+ internal bool _baseCallCheckEnabled = true;
41
+
42
+ [SerializeField]
43
+ internal bool _useConsoleBridge;
44
+
35
45
  /// <summary>
36
46
  /// Controls <see cref="DiagnosticsTarget"/> values applied to <see cref="IMessageBus.GlobalDiagnosticsTargets"/>.
37
47
  /// </summary>
38
48
  public DiagnosticsTarget DiagnosticsTargets
39
49
  {
40
- get => _diagnosticsTargets;
41
- set => _diagnosticsTargets = value;
50
+ get => EffectiveDiagnosticsTargets;
51
+ set
52
+ {
53
+ _diagnosticsTargets = value;
54
+ _legacyEnableDiagnosticsInEditor = false;
55
+ }
42
56
  }
43
57
 
44
58
  /// <summary>
@@ -60,9 +74,124 @@ namespace DxMessaging.Editor.Settings
60
74
  }
61
75
 
62
76
  /// <summary>
63
- /// Loads the settings asset if present, otherwise creates it with sensible defaults.
77
+ /// Master toggle for the <c>MessageAwareComponent</c> base-call check (DXMSG006/007/008).
78
+ /// When <c>false</c>, the Inspector overlay and per-type warnings are silenced; the underlying
79
+ /// compile-time analyzer warnings remain unless explicitly suppressed via <c>.editorconfig</c>.
64
80
  /// </summary>
65
- internal static DxMessagingSettings GetOrCreateSettings()
81
+ /// <remarks>
82
+ /// S3: toggling from <c>false</c> back to <c>true</c> pokes
83
+ /// <see cref="DxMessaging.Editor.Analyzers.DxMessagingConsoleHarvester"/> on the next editor
84
+ /// tick so the snapshot repopulates without waiting for the user to clear/re-emit warnings
85
+ /// or to manually invoke <c>Tools/Wallstop Studios/DxMessaging/Rescan Base-Call Warnings</c>. The round-trip
86
+ /// is intentionally indirect (delayCall > RescanNow) to keep this property setter cheap and
87
+ /// safe to invoke from any editor context -- including OnValidate, where AssetDatabase may
88
+ /// be transitional.
89
+ /// </remarks>
90
+ public bool BaseCallCheckEnabled
91
+ {
92
+ get => _baseCallCheckEnabled;
93
+ set
94
+ {
95
+ bool previous = _baseCallCheckEnabled;
96
+ _baseCallCheckEnabled = value;
97
+ if (!previous && value)
98
+ {
99
+ // A master-toggle flip doesn't need a synchronous reflective harvest right now;
100
+ // the polled tick (~250ms) will pick up the sentinel cheaply on the editor's
101
+ // own update thread, avoiding a heavy reflection sweep on the main thread when
102
+ // the user has just clicked a checkbox. Indirected through delayCall so the
103
+ // setter is safe to invoke from any editor context (OnValidate, button click,
104
+ // etc.) without risking AssetDatabase reentrancy.
105
+ EditorApplication.delayCall += DxMessaging
106
+ .Editor
107
+ .Analyzers
108
+ .DxMessagingConsoleHarvester
109
+ .RequestRescan;
110
+ }
111
+ }
112
+ }
113
+
114
+ /// <summary>
115
+ /// Opt-in toggle for the legacy console-scrape bridge that augments the IL-reflection
116
+ /// scanner's snapshot with warnings harvested from <c>UnityEditor.LogEntries</c> and from
117
+ /// <c>CompilationPipeline.assemblyCompilationFinished</c>.
118
+ /// </summary>
119
+ /// <remarks>
120
+ /// <para>
121
+ /// Default <c>false</c>. The IL-reflection scanner
122
+ /// (<see cref="DxMessaging.Editor.Analyzers.BaseCallTypeScanner"/>) is the deterministic,
123
+ /// always-on primary source -- it walks every loaded <c>MessageAwareComponent</c> subclass
124
+ /// and inspects each override's IL body for the base-call shape, which is reliable across
125
+ /// Unity 2021 cache hits, incremental compiles, and arbitrary domain-reload sequences.
126
+ /// </para>
127
+ /// <para>
128
+ /// The legacy bridge predates the IL scanner and was the source of the intermittent
129
+ /// "missing warnings" bug on Unity 2021. Enable it ONLY if you want the union of both
130
+ /// data sources -- for example, to surface a regression in the IL byte-walker that is
131
+ /// already correctly captured by the compile-time analyzer's console output.
132
+ /// </para>
133
+ /// <para>
134
+ /// Toggling this property is observable via a deferred
135
+ /// <see cref="DxMessaging.Editor.Analyzers.DxMessagingConsoleHarvester.ScheduleRescanWhenIdle"/>
136
+ /// so the inspector overlay refreshes without waiting for the next compile.
137
+ /// </para>
138
+ /// </remarks>
139
+ public bool UseConsoleBridge
140
+ {
141
+ get => _useConsoleBridge;
142
+ set
143
+ {
144
+ if (_useConsoleBridge == value)
145
+ {
146
+ return;
147
+ }
148
+ _useConsoleBridge = value;
149
+ EditorUtility.SetDirty(this);
150
+ DxMessaging.Editor.Analyzers.DxMessagingConsoleHarvester.ScheduleRescanWhenIdle();
151
+ }
152
+ }
153
+
154
+ /// <summary>
155
+ /// Fully-qualified type names excluded from the base-call check. Editable on the settings
156
+ /// asset Inspector or via the Inspector overlay's "Ignore this type" button.
157
+ /// </summary>
158
+ public IReadOnlyList<string> BaseCallIgnoredTypes => _baseCallIgnoredTypes;
159
+
160
+ /// <summary>
161
+ /// Diagnostics target value after applying legacy serialized fields in memory. This does
162
+ /// not mark the settings asset dirty or persist the migration.
163
+ /// </summary>
164
+ internal DiagnosticsTarget EffectiveDiagnosticsTargets
165
+ {
166
+ get
167
+ {
168
+ if (
169
+ _diagnosticsTargets == DiagnosticsTarget.Off
170
+ && _legacyEnableDiagnosticsInEditor
171
+ )
172
+ {
173
+ return DiagnosticsTarget.Editor;
174
+ }
175
+ return _diagnosticsTargets;
176
+ }
177
+ }
178
+
179
+ /// <summary>
180
+ /// Loads the settings asset without creating, saving, or migrating it. Returns
181
+ /// <c>null</c> when no asset exists.
182
+ /// </summary>
183
+ /// <remarks>
184
+ /// Unlike <see cref="GetOrCreateSettings"/>, this performs NO <c>AssetDatabase</c> mutation
185
+ /// (<c>CreateAsset</c>/<c>SaveAssets</c>/durable legacy migration), so it is safe to call
186
+ /// during the domain-load asset-import window -- e.g. from an <c>[InitializeOnLoad]</c>
187
+ /// static constructor -- where a synchronous mutation re-enters the importer and crashes
188
+ /// the native editor (issue #210). Legacy serialized fields are still reflected through
189
+ /// effective property getters so passive callers see the intended value while the durable
190
+ /// migration waits for a safe editor-idle tick. Callers that need the asset
191
+ /// created/migrated must schedule <see cref="GetOrCreateSettings"/> off that window (e.g.
192
+ /// via <see cref="DxMessaging.Editor.DxMessagingEditorIdle.ScheduleAssetDatabaseMutation"/>).
193
+ /// </remarks>
194
+ internal static DxMessagingSettings LoadSettingsPassive()
66
195
  {
67
196
  DxMessagingSettings settings = AssetDatabase.LoadAssetAtPath<DxMessagingSettings>(
68
197
  SettingsPath
@@ -77,12 +206,29 @@ namespace DxMessaging.Editor.Settings
77
206
  .FirstOrDefault(asset => asset != null);
78
207
  }
79
208
 
209
+ return settings;
210
+ }
211
+
212
+ /// <summary>
213
+ /// Loads the settings asset if present, otherwise creates it with sensible defaults.
214
+ /// </summary>
215
+ /// <remarks>
216
+ /// Performs <c>AssetDatabase</c> mutations (create on first run, legacy-field migration), so
217
+ /// it MUST NOT be called synchronously during the domain-load asset-import window (issue
218
+ /// #210). Use <see cref="LoadSettingsPassive"/> for mutation-free reads in that context.
219
+ /// </remarks>
220
+ internal static DxMessagingSettings GetOrCreateSettings()
221
+ {
222
+ DxMessagingSettings settings = LoadSettingsPassive();
223
+
80
224
  if (settings == null)
81
225
  {
82
226
  settings = CreateInstance<DxMessagingSettings>();
83
227
  settings._diagnosticsTargets = DiagnosticsTarget.Off;
84
228
  settings._messageBufferSize = IMessageBus.DefaultMessageBufferSize;
85
229
  settings._suppressDomainReloadWarning = true;
230
+ settings._baseCallCheckEnabled = true;
231
+ settings._baseCallIgnoredTypes = new List<string>();
86
232
  if (!AssetDatabase.IsValidFolder("Assets/Editor"))
87
233
  {
88
234
  AssetDatabase.CreateFolder("Assets", "Editor");
@@ -91,13 +237,8 @@ namespace DxMessaging.Editor.Settings
91
237
  AssetDatabase.SaveAssets();
92
238
  }
93
239
 
94
- if (
95
- settings._diagnosticsTargets == DiagnosticsTarget.Off
96
- && settings._legacyEnableDiagnosticsInEditor
97
- )
240
+ if (settings.ApplyLegacyDiagnosticsMigration())
98
241
  {
99
- settings._diagnosticsTargets = DiagnosticsTarget.Editor;
100
- settings._legacyEnableDiagnosticsInEditor = false;
101
242
  EditorUtility.SetDirty(settings);
102
243
  AssetDatabase.SaveAssets();
103
244
  }
@@ -105,6 +246,21 @@ namespace DxMessaging.Editor.Settings
105
246
  return settings;
106
247
  }
107
248
 
249
+ internal bool ApplyLegacyDiagnosticsMigration()
250
+ {
251
+ if (!_legacyEnableDiagnosticsInEditor)
252
+ {
253
+ return false;
254
+ }
255
+
256
+ if (_diagnosticsTargets == DiagnosticsTarget.Off)
257
+ {
258
+ _diagnosticsTargets = DiagnosticsTarget.Editor;
259
+ }
260
+ _legacyEnableDiagnosticsInEditor = false;
261
+ return true;
262
+ }
263
+
108
264
  /// <summary>
109
265
  /// Returns a serialized wrapper for use in SettingsProvider inspectors.
110
266
  /// </summary>
@@ -112,6 +268,100 @@ namespace DxMessaging.Editor.Settings
112
268
  {
113
269
  return new SerializedObject(GetOrCreateSettings());
114
270
  }
271
+
272
+ private void OnEnable()
273
+ {
274
+ // Defensive: the field can be null if the asset was saved before this field existed.
275
+ EnsureIgnoreListInitialized();
276
+ // Intentionally NOT regenerating the sidecar here. OnEnable fires on every domain reload
277
+ // and play-mode entry; the sidecar on disk is already consistent with what we'd write
278
+ // (RegenerateSidecar is idempotent, but ImportAsset still produces churn). Regen runs
279
+ // only from OnValidate (user-driven edits) and from explicit Add/RemoveIgnoredType calls.
280
+ }
281
+
282
+ private void OnValidate()
283
+ {
284
+ EnsureIgnoreListInitialized();
285
+ // Issue #210: OnValidate fires during asset deserialization, including the domain-load
286
+ // asset-import-worker window where EditorApplication.isUpdating/isCompiling are both
287
+ // false. Writing + importing the sidecar synchronously there re-enters the asset
288
+ // importer and hard-crashes the native editor (GuidReservations::Reserve abort on Unity
289
+ // 6000.4+). Always defer to the next editor tick; never import synchronously from here.
290
+ DxMessagingBaseCallIgnoreSync.RegenerateSidecarDeferred(this);
291
+ }
292
+
293
+ private void EnsureIgnoreListInitialized()
294
+ {
295
+ if (_baseCallIgnoredTypes == null)
296
+ {
297
+ _baseCallIgnoredTypes = new List<string>();
298
+ }
299
+ }
300
+
301
+ /// <summary>
302
+ /// Adds <paramref name="fullyQualifiedTypeName"/> to the ignore list, marks the asset
303
+ /// dirty, saves, and regenerates the sidecar. No-op when the entry is already present.
304
+ /// </summary>
305
+ internal void AddIgnoredType(string fullyQualifiedTypeName)
306
+ {
307
+ if (string.IsNullOrWhiteSpace(fullyQualifiedTypeName))
308
+ {
309
+ return;
310
+ }
311
+ EnsureIgnoreListInitialized();
312
+ if (
313
+ _baseCallIgnoredTypes.Any(entry =>
314
+ string.Equals(entry, fullyQualifiedTypeName, System.StringComparison.Ordinal)
315
+ )
316
+ )
317
+ {
318
+ return;
319
+ }
320
+ _baseCallIgnoredTypes.Add(fullyQualifiedTypeName);
321
+ EditorUtility.SetDirty(this);
322
+ AssetDatabase.SaveAssets();
323
+ TryRegenerateSidecar();
324
+ }
325
+
326
+ /// <summary>
327
+ /// Removes <paramref name="fullyQualifiedTypeName"/> from the ignore list, marks the asset
328
+ /// dirty, saves, and regenerates the sidecar. No-op when the entry is absent.
329
+ /// </summary>
330
+ internal void RemoveIgnoredType(string fullyQualifiedTypeName)
331
+ {
332
+ if (string.IsNullOrWhiteSpace(fullyQualifiedTypeName))
333
+ {
334
+ return;
335
+ }
336
+ if (_baseCallIgnoredTypes == null)
337
+ {
338
+ return;
339
+ }
340
+ int removed = _baseCallIgnoredTypes.RemoveAll(entry =>
341
+ string.Equals(entry, fullyQualifiedTypeName, System.StringComparison.Ordinal)
342
+ );
343
+ if (removed > 0)
344
+ {
345
+ EditorUtility.SetDirty(this);
346
+ AssetDatabase.SaveAssets();
347
+ TryRegenerateSidecar();
348
+ }
349
+ }
350
+
351
+ private void TryRegenerateSidecar()
352
+ {
353
+ try
354
+ {
355
+ DxMessagingBaseCallIgnoreSync.RegenerateSidecar(this);
356
+ }
357
+ catch (System.Exception ex)
358
+ {
359
+ DxMessaging.Editor.DxMessagingEditorLog.LogWarning(
360
+ "Failed to regenerate base-call ignore sidecar.",
361
+ ex
362
+ );
363
+ }
364
+ }
115
365
  }
116
366
  #endif
117
367
  }
@@ -1,3 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 477d53eef70c4496b945199c62169dfb
3
- timeCreated: 1749668079
1
+ fileFormatVersion: 2
2
+ guid: 477d53eef70c4496b945199c62169dfb
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -10,7 +10,7 @@ namespace DxMessaging.Editor.Settings
10
10
  /// Project Settings provider for DxMessaging configuration.
11
11
  /// </summary>
12
12
  /// <remarks>
13
- /// Exposes toggles for global diagnostics mode and message buffer size under Project Settings DxMessaging.
13
+ /// Exposes toggles for global diagnostics mode and message buffer size under Project Settings > Wallstop Studios > DxMessaging.
14
14
  /// </remarks>
15
15
  public sealed class DxMessagingSettingsProvider : SettingsProvider
16
16
  {
@@ -41,53 +41,70 @@ namespace DxMessaging.Editor.Settings
41
41
  /// <param name="searchContext">Search text provided by the Project Settings window.</param>
42
42
  public override void OnGUI(string searchContext)
43
43
  {
44
- SerializedProperty targetsProp = _messagingSettings.FindProperty(
45
- nameof(DxMessagingSettings._diagnosticsTargets)
46
- );
47
- DiagnosticsTarget currentTargets = (DiagnosticsTarget)targetsProp.enumValueFlag;
48
- DiagnosticsTarget updatedTargets = (DiagnosticsTarget)
49
- EditorGUILayout.EnumFlagsField(
44
+ float previousLabelWidth = EditorGUIUtility.labelWidth;
45
+ EditorGUIUtility.labelWidth = 240f;
46
+ try
47
+ {
48
+ SerializedProperty targetsProp = _messagingSettings.FindProperty(
49
+ nameof(DxMessagingSettings._diagnosticsTargets)
50
+ );
51
+ DiagnosticsTarget currentTargets = (DiagnosticsTarget)targetsProp.enumValueFlag;
52
+ DiagnosticsTarget updatedTargets = (DiagnosticsTarget)
53
+ EditorGUILayout.EnumFlagsField(
54
+ new GUIContent(
55
+ "Diagnostics Targets",
56
+ "Select where global diagnostics should be enabled by default. Combine flags for multiple targets."
57
+ ),
58
+ currentTargets
59
+ );
60
+ if (updatedTargets != currentTargets)
61
+ {
62
+ targetsProp.enumValueFlag = (int)updatedTargets;
63
+ }
64
+ EditorGUILayout.PropertyField(
65
+ _messagingSettings.FindProperty(nameof(DxMessagingSettings._messageBufferSize)),
50
66
  new GUIContent(
51
- "Diagnostics Targets",
52
- "Select where global diagnostics should be enabled by default. Combine flags for multiple targets."
67
+ "Message Buffer Size",
68
+ "Number of emissions kept per bus/token when diagnostics mode is active."
69
+ )
70
+ );
71
+ EditorGUILayout.PropertyField(
72
+ _messagingSettings.FindProperty(
73
+ nameof(DxMessagingSettings._suppressDomainReloadWarning)
53
74
  ),
54
- currentTargets
75
+ new GUIContent(
76
+ "Suppress Domain Reload Warning",
77
+ "Disable the warning shown when Enter Play Mode Options skips domain reload; DxMessaging still resets its statics."
78
+ )
55
79
  );
56
- if (updatedTargets != currentTargets)
80
+
81
+ _messagingSettings.ApplyModifiedProperties();
82
+ }
83
+ finally
57
84
  {
58
- targetsProp.enumValueFlag = (int)updatedTargets;
85
+ EditorGUIUtility.labelWidth = previousLabelWidth;
59
86
  }
60
- EditorGUILayout.PropertyField(
61
- _messagingSettings.FindProperty(nameof(DxMessagingSettings._messageBufferSize)),
62
- new GUIContent(
63
- "Message Buffer Size",
64
- "Number of emissions kept per bus/token when diagnostics mode is active."
65
- )
66
- );
67
- EditorGUILayout.PropertyField(
68
- _messagingSettings.FindProperty(
69
- nameof(DxMessagingSettings._suppressDomainReloadWarning)
70
- ),
71
- new GUIContent(
72
- "Suppress Domain Reload Warning",
73
- "Disable the warning shown when Enter Play Mode Options skips domain reload; DxMessaging still resets its statics."
74
- )
75
- );
76
-
77
- _messagingSettings.ApplyModifiedProperties();
78
87
  }
79
88
 
80
- [SettingsProvider]
81
89
  /// <summary>
82
90
  /// Factory used by Unity to register the DxMessaging project settings page.
83
91
  /// </summary>
84
92
  /// <returns>Configured settings provider instance.</returns>
93
+ [SettingsProvider]
85
94
  public static SettingsProvider CreateDxMessagingSettingsProvider()
86
95
  {
87
- DxMessagingSettingsProvider provider = new("Project/DxMessaging")
96
+ DxMessagingSettingsProvider provider = new("Project/Wallstop Studios/DxMessaging")
88
97
  {
89
98
  keywords = new HashSet<string>(
90
- new[] { "DxMessaging", "Diagnostics", "MessageBus", "Targets" }
99
+ new[]
100
+ {
101
+ "DxMessaging",
102
+ "Diagnostics",
103
+ "MessageBus",
104
+ "Targets",
105
+ "Wallstop",
106
+ "Wallstop Studios",
107
+ }
91
108
  ),
92
109
  };
93
110
 
@@ -1,3 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: e4353b92a69a4703abc268fb885a1224
3
- timeCreated: 1749668115
1
+ fileFormatVersion: 2
2
+ guid: e4353b92a69a4703abc268fb885a1224
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
2
- guid: 73f79e95899848a9b4307c19174b4a45
1
+ fileFormatVersion: 2
2
+ guid: 73f79e95899848a9b4307c19174b4a45
3
3
  timeCreated: 1749668065