com.wallstop-studios.dxmessaging 2.0.0-rc26.6 → 2.0.0-rc26.8

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 (92) hide show
  1. package/.github/dependabot.yml +10 -0
  2. package/.github/workflows/npm-publish.yml +2 -2
  3. package/Editor/CustomEditors/MessagingComponentEditor.cs +1 -1
  4. package/Editor/CustomEditors/MessagingComponentEditor.cs.meta +1 -1
  5. package/Editor/CustomEditors.meta +1 -1
  6. package/Editor/DxMessagingEditorInitializer.cs +1 -1
  7. package/Editor/DxMessagingEditorInitializer.cs.meta +1 -1
  8. package/Editor/Settings/DxMessagingSettings.cs +1 -1
  9. package/Editor/Settings/DxMessagingSettings.cs.meta +1 -1
  10. package/Editor/Settings/DxMessagingSettingsProvider.cs +1 -1
  11. package/Editor/Settings/DxMessagingSettingsProvider.cs.meta +1 -1
  12. package/Editor/Settings.meta +1 -1
  13. package/Editor/SetupCscRsp.cs +1 -1
  14. package/Editor/SetupCscRsp.cs.meta +1 -1
  15. package/Runtime/Core/Attributes/DxAutoConstructorAttribute.cs +1 -1
  16. package/Runtime/Core/Attributes/DxAutoConstructorAttribute.cs.meta +1 -1
  17. package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs +1 -1
  18. package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +1 -1
  19. package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs +1 -1
  20. package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs +1 -1
  21. package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +1 -1
  22. package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs +1 -1
  23. package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +1 -1
  24. package/Runtime/Core/Attributes.meta +1 -1
  25. package/Runtime/Core/DataStructure/CyclicBuffer.cs +1 -1
  26. package/Runtime/Core/DataStructure/CyclicBuffer.cs.meta +1 -1
  27. package/Runtime/Core/DataStructure.meta +1 -1
  28. package/Runtime/Core/Diagnostics/MessageEmissionData.cs +1 -1
  29. package/Runtime/Core/Diagnostics/MessageEmissionData.cs.meta +1 -1
  30. package/Runtime/Core/Diagnostics/MessageRegistrationData.cs +1 -1
  31. package/Runtime/Core/Diagnostics/MessageRegistrationData.cs.meta +1 -1
  32. package/Runtime/Core/Diagnostics/MessageRegistrationType.cs +1 -1
  33. package/Runtime/Core/Diagnostics/MessageRegistrationType.cs.meta +1 -1
  34. package/Runtime/Core/Diagnostics.meta +1 -1
  35. package/Runtime/Core/Extensions/EnumExtensions.cs +25 -18
  36. package/Runtime/Core/Extensions/EnumExtensions.cs.meta +1 -1
  37. package/Runtime/Core/Extensions/IListExtensions.cs +1 -1
  38. package/Runtime/Core/Extensions/IListExtensions.cs.meta +1 -1
  39. package/Runtime/Core/Extensions/MessageExtensions.cs +1 -1
  40. package/Runtime/Core/Helper/MessageCache.cs +1 -1
  41. package/Runtime/Core/Helper/MessageCache.cs.meta +1 -1
  42. package/Runtime/Core/Helper/MessageHelperIndexer.cs +1 -1
  43. package/Runtime/Core/Helper/MessageHelperIndexer.cs.meta +1 -1
  44. package/Runtime/Core/Helper.meta +1 -1
  45. package/Runtime/Core/IMessage.cs +1 -1
  46. package/Runtime/Core/InstanceId.cs +1 -1
  47. package/Runtime/Core/MessageBus/IMessageBus.cs +1 -1
  48. package/Runtime/Core/MessageBus/MessageBus.cs +1 -1
  49. package/Runtime/Core/MessageBus/MessagingRegistration.cs +1 -1
  50. package/Runtime/Core/MessageBus/RegistrationLog.cs +1 -1
  51. package/Runtime/Core/MessageHandler.cs +1 -1
  52. package/Runtime/Core/MessageRegistrationHandle.cs +1 -1
  53. package/Runtime/Core/MessageRegistrationToken.cs +1 -1
  54. package/Runtime/Core/Messages/GlobalStringMessage.cs +1 -1
  55. package/Runtime/Core/Messages/GlobalStringMessage.cs.meta +1 -1
  56. package/Runtime/Core/Messages/IBroadcastMessage.cs +1 -1
  57. package/Runtime/Core/Messages/ITargetedMessage.cs +1 -1
  58. package/Runtime/Core/Messages/IUntargetedMessage.cs +1 -1
  59. package/Runtime/Core/Messages/ReflexiveMessage.cs +1 -1
  60. package/Runtime/Core/Messages/ReflexiveMessage.cs.meta +1 -1
  61. package/Runtime/Core/Messages/StringMessage.cs +1 -1
  62. package/Runtime/Core/Messages/StringMessage.cs.meta +1 -1
  63. package/Runtime/Core/MessagingDebug.cs +1 -1
  64. package/Runtime/Unity/MessageAwareComponent.cs +1 -1
  65. package/Runtime/Unity/MessagingComponent.cs +12 -23
  66. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs +1 -1
  67. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs +1 -1
  68. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs.meta +1 -1
  69. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj +1 -1
  70. package/Tests/Runtime/Benchmarks/PerformanceTests.cs +1 -1
  71. package/Tests/Runtime/Core/BroadcastTests.cs +1 -1
  72. package/Tests/Runtime/Core/EnablementTests.cs +1 -1
  73. package/Tests/Runtime/Core/EnablementTests.cs.meta +1 -1
  74. package/Tests/Runtime/Core/GenericMessageTests.cs +1 -1
  75. package/Tests/Runtime/Core/GlobalAcceptAllTests.cs +1 -1
  76. package/Tests/Runtime/Core/MessagingTestBase.cs +1 -1
  77. package/Tests/Runtime/Core/PostProcessorTests.cs +1 -1
  78. package/Tests/Runtime/Core/RegistrationTests.cs +1 -1
  79. package/Tests/Runtime/Core/TargetedTests.cs +1 -1
  80. package/Tests/Runtime/Core/UntargetedTests.cs +1 -1
  81. package/Tests/Runtime/Scripts/Components/EmptyMessageAwareComponent.cs +1 -1
  82. package/Tests/Runtime/Scripts/Components/GenericMessageAwareComponent.cs +1 -1
  83. package/Tests/Runtime/Scripts/Components/GenericMessageAwareComponent.cs.meta +1 -1
  84. package/Tests/Runtime/Scripts/Components/SimpleMessageAwareComponent.cs +1 -1
  85. package/Tests/Runtime/Scripts/Messages/ComplexTargetedMessage.cs +1 -1
  86. package/Tests/Runtime/Scripts/Messages/GenericUntargetedMessage.cs +1 -1
  87. package/Tests/Runtime/Scripts/Messages/GenericUntargetedMessage.cs.meta +1 -1
  88. package/Tests/Runtime/Scripts/Messages/SimpleBroadcastMessage.cs +1 -1
  89. package/Tests/Runtime/Scripts/Messages/SimpleTargetedMessage.cs +1 -1
  90. package/Tests/Runtime/Scripts/Messages/SimpleUntargetedMessage.cs +1 -1
  91. package/Tests/Runtime/WallstopStudios.DxMessaging.Tests.Runtime.csproj +1 -1
  92. package/package.json +3 -1
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ assignees:
8
+ - wallstop
9
+ reviewers:
10
+ - wallstop
@@ -14,12 +14,12 @@ jobs:
14
14
 
15
15
  steps:
16
16
  - name: Checkout Repository
17
- uses: actions/checkout@v4
17
+ uses: actions/checkout@v5
18
18
  with:
19
19
  fetch-depth: 0 # Ensure full commit history for version comparison
20
20
 
21
21
  - name: Set up Node.js
22
- uses: actions/setup-node@v4
22
+ uses: actions/setup-node@v5
23
23
  with:
24
24
  node-version: 18
25
25
  registry-url: 'https://registry.npmjs.org/'
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Editor.CustomEditors
1
+ namespace DxMessaging.Editor.CustomEditors
2
2
  {
3
3
  #if UNITY_EDITOR
4
4
  using System.Collections.Generic;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: e078b310572343318b79a3c00d0f274d
3
3
  timeCreated: 1749666380
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 652cab55c8444567a5101966444e9071
3
3
  timeCreated: 1749666371
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Editor
1
+ namespace DxMessaging.Editor
2
2
  {
3
3
  #if UNITY_EDITOR
4
4
  using Core.MessageBus;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: b5eeb11bcc9d4d70861d5dc7084daae5
3
3
  timeCreated: 1749668189
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Editor.Settings
1
+ namespace DxMessaging.Editor.Settings
2
2
  {
3
3
  #if UNITY_EDITOR
4
4
  using System.Linq;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 477d53eef70c4496b945199c62169dfb
3
3
  timeCreated: 1749668079
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Editor.Settings
1
+ namespace DxMessaging.Editor.Settings
2
2
  {
3
3
  #if UNITY_EDITOR
4
4
  using System.Collections.Generic;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: e4353b92a69a4703abc268fb885a1224
3
3
  timeCreated: 1749668115
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 73f79e95899848a9b4307c19174b4a45
3
3
  timeCreated: 1749668065
@@ -1,4 +1,4 @@
1
- #if UNITY_EDITOR
1
+ #if UNITY_EDITOR
2
2
 
3
3
  namespace DxMessaging.Editor
4
4
  {
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 54bd01ff5fd34bbc9950a1c7230a15d8
3
3
  timeCreated: 1730841461
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Attributes
1
+ namespace DxMessaging.Core.Attributes
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: bef6adb9baf545129cb9a841b13da451
3
3
  timeCreated: 1749776355
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Attributes
1
+ namespace DxMessaging.Core.Attributes
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 73fd653a34be4f36b5773dce342ae9fa
3
3
  timeCreated: 1730779174
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Attributes
1
+ namespace DxMessaging.Core.Attributes
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Attributes
1
+ namespace DxMessaging.Core.Attributes
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: ab2509dd51f5467d95b4fca1cb794b29
3
3
  timeCreated: 1730779159
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Attributes
1
+ namespace DxMessaging.Core.Attributes
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 418b461df3764ef6896dc86524a00132
3
3
  timeCreated: 1730779131
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: e2cb23a56cf1416ba06dccca58c8297f
3
3
  timeCreated: 1730779055
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.DataStructure
1
+ namespace DxMessaging.Core.DataStructure
2
2
  {
3
3
  using System;
4
4
  using System.Collections;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 7d8dbf8640e24846bf35fb18a1b7c504
3
3
  timeCreated: 1749671893
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 9862044472704c86ade5612ddcdfd5b5
3
3
  timeCreated: 1749671887
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Diagnostics
1
+ namespace DxMessaging.Core.Diagnostics
2
2
  {
3
3
  using System;
4
4
  #if UNITY_2017_1_OR_NEWER
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 8eafaabae0f549ec82f67ea18be788e1
3
3
  timeCreated: 1749672335
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Diagnostics
1
+ namespace DxMessaging.Core.Diagnostics
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 01598791b01241caabfecea4c1f5880d
3
3
  timeCreated: 1749672447
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Diagnostics
1
+ namespace DxMessaging.Core.Diagnostics
2
2
  {
3
3
  public enum MessageRegistrationType
4
4
  {
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 7d393cfbb3c8429d83af17a737fdaf0e
3
3
  timeCreated: 1749672471
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 9606a03ced274c3888a4d993309786a4
3
3
  timeCreated: 1749672323
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Extensions
1
+ namespace DxMessaging.Core.Extensions
2
2
  {
3
3
  using System;
4
4
  using System.Runtime.CompilerServices;
@@ -9,29 +9,36 @@
9
9
  internal static bool HasFlagNoAlloc<T>(this T value, T flag)
10
10
  where T : unmanaged, Enum
11
11
  {
12
- ulong valueUnderlying = GetUInt64(value);
13
- ulong flagUnderlying = GetUInt64(flag);
14
- return (valueUnderlying & flagUnderlying) == flagUnderlying;
12
+ ulong? valueUnderlying = GetUInt64(value);
13
+ ulong? flagUnderlying = GetUInt64(flag);
14
+ if (valueUnderlying == null || flagUnderlying == null)
15
+ {
16
+ // Fallback for unsupported enum sizes
17
+ return value.HasFlag(flag);
18
+ }
19
+
20
+ return (valueUnderlying.Value & flagUnderlying.Value) == flagUnderlying.Value;
15
21
  }
16
22
 
17
23
  [MethodImpl(MethodImplOptions.AggressiveInlining)]
18
- private static unsafe ulong GetUInt64<T>(T value)
24
+ private static ulong? GetUInt64<T>(T value)
19
25
  where T : unmanaged
20
26
  {
21
- /*
22
- Works because T is constrained to unmanaged, so it's safe to reinterpret
23
- All enums are value types and have a fixed size
24
- */
25
- return sizeof(T) switch
27
+ try
28
+ {
29
+ return Unsafe.SizeOf<T>() switch
30
+ {
31
+ 1 => Unsafe.As<T, byte>(ref value),
32
+ 2 => Unsafe.As<T, ushort>(ref value),
33
+ 4 => Unsafe.As<T, uint>(ref value),
34
+ 8 => Unsafe.As<T, ulong>(ref value),
35
+ _ => null,
36
+ };
37
+ }
38
+ catch
26
39
  {
27
- 1 => *(byte*)&value,
28
- 2 => *(ushort*)&value,
29
- 4 => *(uint*)&value,
30
- 8 => *(ulong*)&value,
31
- _ => throw new ArgumentException(
32
- $"Unsupported enum size: {sizeof(T)} for type {typeof(T)}"
33
- ),
34
- };
40
+ return null;
41
+ }
35
42
  }
36
43
  }
37
44
  }
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: f01ee914d7634a69a85f86bb02f2f07e
3
3
  timeCreated: 1745162639
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Extensions
1
+ namespace DxMessaging.Core.Extensions
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: f6956caef19744a0b0d96215d4e5154a
3
3
  timeCreated: 1749671953
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Extensions
1
+ namespace DxMessaging.Core.Extensions
2
2
  {
3
3
  using Core;
4
4
  using MessageBus;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Helper
1
+ namespace DxMessaging.Core.Helper
2
2
  {
3
3
  using System.Collections;
4
4
  using System.Collections.Generic;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 23cb3bf7f25d479c862736482ee96fa7
3
3
  timeCreated: 1745102344
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Helper
1
+ namespace DxMessaging.Core.Helper
2
2
  {
3
3
  public static class MessageHelperIndexer
4
4
  {
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 612c352c3d984a3486ac4b19bb69fa37
3
3
  timeCreated: 1745101032
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 351ee8f890884099b6c7c32e66f196a9
3
3
  timeCreated: 1745100990
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core
1
+ namespace DxMessaging.Core
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core
1
+ namespace DxMessaging.Core
2
2
  {
3
3
  using System;
4
4
  using System.Runtime.CompilerServices;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.MessageBus
1
+ namespace DxMessaging.Core.MessageBus
2
2
  {
3
3
  using System;
4
4
  using System.Threading;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.MessageBus
1
+ namespace DxMessaging.Core.MessageBus
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.MessageBus
1
+ namespace DxMessaging.Core.MessageBus
2
2
  {
3
3
  using System;
4
4
  using System.Runtime.Serialization;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.MessageBus
1
+ namespace DxMessaging.Core.MessageBus
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core
1
+ namespace DxMessaging.Core
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core
1
+ namespace DxMessaging.Core
2
2
  {
3
3
  using System;
4
4
  using System.Threading;
@@ -1,4 +1,4 @@
1
- [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("WallstopStudios.Dxmessaging.Editor")]
1
+ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("WallstopStudios.Dxmessaging.Editor")]
2
2
 
3
3
  namespace DxMessaging.Core
4
4
  {
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 58b2b780f9844aeb8929eeca855ba3be
3
3
  timeCreated: 1745161506
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: f9a83f6bf3c0487f9e5cff498dbb6932
3
3
  timeCreated: 1745161955
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core.Messages
1
+ namespace DxMessaging.Core.Messages
2
2
  {
3
3
  using System;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: cf8206ca4c8449a8b8e112ad25554f1f
3
3
  timeCreated: 1745161457
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Core
1
+ namespace DxMessaging.Core
2
2
  {
3
3
  using System;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Unity
1
+ namespace DxMessaging.Unity
2
2
  {
3
3
  using Core;
4
4
  using Core.Messages;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Unity
1
+ namespace DxMessaging.Unity
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -46,33 +46,17 @@
46
46
  return createdToken;
47
47
  }
48
48
 
49
- if (_messageHandler == null)
50
- {
51
- _messageHandler = new MessageHandler(gameObject) { active = true };
52
- MessagingDebug.Log(
53
- LogLevel.Debug,
54
- "Creating MessageHandler for componentType {0}, GameObject name: {1}, InstanceId: {2}.",
55
- listener.GetType(),
56
- listener.gameObject.name,
57
- (InstanceId)gameObject
58
- );
59
- }
60
- else
61
- {
62
- MessagingDebug.Log(
63
- LogLevel.Debug,
64
- "Using existing MessageHandler for componentType {0}, GameObject name: {1}, InstanceId: {2}.",
65
- listener.GetType(),
66
- listener.gameObject.name,
67
- (InstanceId)gameObject
68
- );
69
- }
70
-
49
+ _messageHandler ??= CreateMessageHandler();
71
50
  createdToken = MessageRegistrationToken.Create(_messageHandler);
72
51
  _registeredListeners[listener] = createdToken;
73
52
  return createdToken;
74
53
  }
75
54
 
55
+ private void Awake()
56
+ {
57
+ _messageHandler ??= CreateMessageHandler();
58
+ }
59
+
76
60
  public void OnEnable()
77
61
  {
78
62
  ToggleMessageHandler(true);
@@ -95,5 +79,10 @@
95
79
  _messageHandler.active = newActive;
96
80
  }
97
81
  }
82
+
83
+ private MessageHandler CreateMessageHandler()
84
+ {
85
+ return new MessageHandler(gameObject) { active = true };
86
+ }
98
87
  }
99
88
  }
@@ -1,4 +1,4 @@
1
- namespace WallstopStudios.DxMessaging.SourceGenerators
1
+ namespace WallstopStudios.DxMessaging.SourceGenerators
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- namespace WallstopStudios.DxMessaging.SourceGenerators
1
+ namespace WallstopStudios.DxMessaging.SourceGenerators
2
2
  {
3
3
  using System;
4
4
  using System.Collections.Generic;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 8525b467bd2c430a90ccee97f321a845
3
3
  timeCreated: 1744403125
@@ -1,4 +1,4 @@
1
- <Project Sdk="Microsoft.NET.Sdk">
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
2
  <PropertyGroup>
3
3
  <TargetFramework>netstandard2.0</TargetFramework>
4
4
  <LangVersion>latest</LangVersion>
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Benchmarks
1
+ namespace DxMessaging.Tests.Runtime.Benchmarks
2
2
  {
3
3
  using System;
4
4
  using System.Diagnostics;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System.Collections;
4
4
  using System.Collections.Generic;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System.Collections;
4
4
  using DxMessaging.Core.Extensions;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: eea2922068114db1a00375d95322a755
3
3
  timeCreated: 1744481637
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using DxMessaging.Core;
4
4
  using DxMessaging.Core.Extensions;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System;
4
4
  using System.Collections;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System;
4
4
  using System.Collections;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System;
4
4
  using System.Collections;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System;
4
4
  using System.Collections;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System.Collections;
4
4
  using System.Linq;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Core
1
+ namespace DxMessaging.Tests.Runtime.Core
2
2
  {
3
3
  using System.Collections;
4
4
  using System.Linq;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Components
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Components
2
2
  {
3
3
  using Unity;
4
4
 
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Components
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Components
2
2
  {
3
3
  using Messages;
4
4
  using Unity;
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: 3b5b962e8c244838be18e01d1a47542c
3
3
  timeCreated: 1744426157
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Components
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Components
2
2
  {
3
3
  using System;
4
4
  using DxMessaging.Core;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Messages
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Messages
2
2
  {
3
3
  using System;
4
4
  using DxMessaging.Core.Attributes;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Messages
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Messages
2
2
  {
3
3
  using DxMessaging.Core.Attributes;
4
4
 
@@ -1,3 +1,3 @@
1
- fileFormatVersion: 2
1
+ fileFormatVersion: 2
2
2
  guid: f1e39abb3eaa468daa20f7d3d50052d1
3
3
  timeCreated: 1744425432
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Messages
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Messages
2
2
  {
3
3
  using DxMessaging.Core.Attributes;
4
4
  using DxMessaging.Core.Messages;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Messages
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Messages
2
2
  {
3
3
  using DxMessaging.Core.Attributes;
4
4
  using DxMessaging.Core.Messages;
@@ -1,4 +1,4 @@
1
- namespace DxMessaging.Tests.Runtime.Scripts.Messages
1
+ namespace DxMessaging.Tests.Runtime.Scripts.Messages
2
2
  {
3
3
  using DxMessaging.Core.Attributes;
4
4
  using DxMessaging.Core.Messages;
@@ -1,4 +1,4 @@
1
- <wpf:ResourceDictionary
1
+ <wpf:ResourceDictionary
2
2
  xml:space="preserve"
3
3
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
4
  xmlns:s="clr-namespace:System;assembly=mscorlib"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.dxmessaging",
3
- "version": "2.0.0-rc26.6",
3
+ "version": "2.0.0-rc26.8",
4
4
  "displayName": "DxMessaging",
5
5
  "description": "Synchronous Event Bus for Unity",
6
6
  "unity": "2021.3",
@@ -38,3 +38,5 @@
38
38
 
39
39
 
40
40
 
41
+
42
+