com.wallstop-studios.dxmessaging 2.1.6 β†’ 2.1.7

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.
@@ -13,7 +13,7 @@ using System.Reflection;
13
13
  [assembly: System.Reflection.AssemblyCompanyAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
14
14
  [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
15
15
  [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
16
- [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+dd979c12b73e0fbe9781a817b41662e62786bd08")]
16
+ [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5dcf53da9127ca7484dd02aa99165ee9a30243f5")]
17
17
  [assembly: System.Reflection.AssemblyProductAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
18
18
  [assembly: System.Reflection.AssemblyTitleAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
19
19
  [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.1.7]
11
+
12
+ ### Changed
13
+
14
+ - Improved README with prominent Mental Model section
15
+ - Added Mermaid diagrams and decision flowchart for choosing message types
16
+ - Added Common Mistakes callout with troubleshooting link
17
+ - Updated performance comparison table with accurate benchmark range (10-17M ops/sec)
18
+
19
+ ### Fixed
20
+
21
+ - Regenerated corrupted meta files in `scripts/wiki`
22
+
10
23
  ## [2.1.6]
11
24
 
12
25
  ### Added
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # DxMessaging for Unity
2
2
 
3
3
  <p align="center">
4
- <img src="docs/images/DxMessaging-banner.svg" alt="DxMessaging Banner" width="800"/>
4
+ <img src="docs/images/DxMessaging-banner.svg" alt="DxMessaging - Type-safe messaging system for Unity" width="800"/>
5
5
  </p>
6
6
 
7
7
  <p align="center">
@@ -31,9 +31,11 @@ Need install instructions? Try [OpenUPM](https://openupm.com/packages/com.wallst
31
31
  ## Table of Contents
32
32
 
33
33
  - [30-Second Elevator Pitch](#30-second-elevator-pitch)
34
+ - [Mental Model: How to Think About DxMessaging](#mental-model-how-to-think-about-dxmessaging)
34
35
  - [Quick Start (5 Minutes)](#quick-start-5-minutes)
36
+ - [Dependency Injection (DI) Compatible](#-dependency-injection-di-compatible)
35
37
  - [Is DxMessaging Right for You?](#is-dxmessaging-right-for-you)
36
- - [Why DxMessaging?](#why-dxmessaging)
38
+ - [Why DxMessaging](#why-dxmessaging)
37
39
  - [Key Features](#key-features)
38
40
  - [The DxMessaging Solution](#the-dxmessaging-solution)
39
41
  - [Real-World Examples](#real-world-examples)
@@ -65,14 +67,114 @@ Need install instructions? Try [OpenUPM](https://openupm.com/packages/com.wallst
65
67
 
66
68
  ##### Three simple message types
67
69
 
68
- 1. **Untargeted** - "Everyone listen!" (pause game, settings changed)
69
- 1. **Targeted** - "Tell Player to heal" (commands to specific entities)
70
- 1. **Broadcast** - "I took damage" (things that happen to _you_ that others can observe)
70
+ 1. **Untargeted** - Global announcements
71
+ 1. **Targeted** - Commands to specific entities
72
+ 1. **Broadcast** - Observable facts from a source
73
+
74
+ See [Mental Model](#mental-model-how-to-think-about-dxmessaging) for how to choose the right type.
71
75
 
72
76
  **One line:** It's a type-safe messaging system with automatic lifecycle management and built-in inspection tools.
73
77
 
74
78
  ---
75
79
 
80
+ ## Mental Model: How to Think About DxMessaging
81
+
82
+ ### The Core Idea
83
+
84
+ DxMessaging is built around one principle: **it gets out of your way**.
85
+
86
+ You have data. You need to pass it around. That's the problem. DxMessaging provides fast, simple primitives as building blocks. You model changes as message types with optional context, using game primitives (GameObjects, components) as that context.
87
+
88
+ **You don't build your game INTO the messaging system.** It's opt-in and optionalβ€”a tool you reach for when it helps.
89
+
90
+ ### The Three Message Types: Real-World Analogies
91
+
92
+ > πŸ’‘ _Diagrams below require Mermaid support. If they don't render, try viewing this file directly on [GitHub](https://github.com/wallstop/DxMessaging)._
93
+
94
+ Each message type maps to a real-world communication pattern:
95
+
96
+ #### 1. Untargeted = PA System πŸ“’
97
+
98
+ ```mermaid
99
+ flowchart LR
100
+ S[Someone] -->|announces| PA[πŸ“’ PA System]
101
+ PA --> L1[Listener A]
102
+ PA --> L2[Listener B]
103
+ PA --> L3[Listener C]
104
+ ```
105
+
106
+ Announcements with no specific recipient. Everyone who cares can hear it.
107
+
108
+ **Examples:** "The game is paused", "Settings changed", "Scene finished loading"
109
+
110
+ #### 2. Targeted = Addressed Letter πŸ“¬
111
+
112
+ ```mermaid
113
+ flowchart LR
114
+ S[Sender] -->|"To: Player"| Letter[πŸ“¬ Message Bus]
115
+ Letter --> Player[Player receives]
116
+ Other1[Enemy A] -.->|ignores| Letter
117
+ Other2[Enemy B] -.->|ignores| Letter
118
+ ```
119
+
120
+ Commands to a specific recipient. Only that entity receives them.
121
+
122
+ **Examples:** "Player, heal for 10 HP", "Door #7, open", "This enemy, take 25 damage"
123
+
124
+ #### 3. Broadcast = Radio Station πŸ“»
125
+
126
+ ```mermaid
127
+ flowchart LR
128
+ Source[Enemy] -->|"I took damage!"| Radio[πŸ“» Message Bus]
129
+ Radio --> L1[Damage Numbers UI]
130
+ Radio --> L2[Achievement Tracker]
131
+ Radio --> L3[Analytics]
132
+ Radio --> L4[Combat Log]
133
+ ```
134
+
135
+ Facts emitted by a specific source. No intended recipientβ€”just an origin. Anyone can tune in.
136
+
137
+ **Examples:** "This enemy took 25 damage", "The player picked up item X", "This chest opened"
138
+
139
+ ### Choosing the Right Message Type
140
+
141
+ ```mermaid
142
+ flowchart TD
143
+ Start([I need to send a message])
144
+ Start --> Q1{Does it matter<br/>WHO sent it?}
145
+
146
+ Q1 -->|No| Q2{Does it matter<br/>WHO receives it?}
147
+ Q2 -->|No| Untargeted[Use UNTARGETED<br/>Global announcement]
148
+ Q2 -->|Yes| Targeted[Use TARGETED<br/>Directed command]
149
+
150
+ Q1 -->|Yes| Q3{Am I commanding<br/>someone to act?}
151
+ Q3 -->|Yes| Targeted
152
+ Q3 -->|No| Broadcast[Use BROADCAST<br/>Observable fact]
153
+ ```
154
+
155
+ | Question | Untargeted | Targeted | Broadcast |
156
+ | ----------------------------------- | :--------: | :------: | :-------: |
157
+ | Has a specific sender that matters? | ❌ | ❌ | βœ… |
158
+ | Has a specific recipient? | ❌ | βœ… | ❌ |
159
+ | Is it a command? | ❌ | βœ… | ❌ |
160
+ | Is it an observable fact? | Maybe | ❌ | βœ… |
161
+ | Is it a global announcement? | βœ… | ❌ | ❌ |
162
+
163
+ > ⚠️ **Common Mistakes:**
164
+ >
165
+ > - **Forgetting to enable the token** β€” Messages won't be received. Use `MessageAwareComponent` (auto-enables) or call `Token.Enable()` manually.
166
+ > - **Targeting Component when you meant GameObject** β€” These are distinct registration paths. Component-targeted messages won't reach GameObject-level handlers.
167
+ > - **Using Broadcast when you need Targeted** β€” Broadcasts have no recipient, just an origin. Use Targeted when commanding a specific entity.
168
+ > - **Missing `[Dx*Message]` attribute** β€” The source generator won't process the struct without the marker attribute.
169
+ >
170
+ > πŸ“– See [Troubleshooting](docs/reference/troubleshooting.md) for solutions to these and other issues.
171
+
172
+ πŸ“– **Want more depth?** See the full [Mental Model documentation](docs/concepts/mental-model.md) for detailed examples, lifecycle patterns, and edge cases.
173
+
174
+ πŸ“– **Ready to code?** Jump to [Quick Start](#quick-start-5-minutes) to send your first message!
175
+
176
+ ---
177
+
76
178
  ## Quick Start (5 Minutes)
77
179
 
78
180
  **New to messaging?** Start with the [Visual Guide](docs/getting-started/visual-guide.md) (5 min) for a beginner-friendly introduction!
@@ -85,7 +187,7 @@ Need install instructions? Try [OpenUPM](https://openupm.com/packages/com.wallst
85
187
  openupm add com.wallstop-studios.dxmessaging
86
188
  ```
87
189
 
88
- ##### Or via Git URL
190
+ #### Or via Git URL
89
191
 
90
192
  ```bash
91
193
  # Unity Package Manager > Add package from git URL...
@@ -235,8 +337,6 @@ flowchart TD
235
337
 
236
338
  **Rule of thumb:** If you're reading this README and thinking "this could address several challenges I'm facing," then DxMessaging may be a good fit. If you're thinking "this seems complicated," start with the [Visual Guide](docs/getting-started/visual-guide.md) or stick with simpler patterns.
237
339
 
238
- **New to messaging?** Start with the [Visual Guide](docs/getting-started/visual-guide.md) (5 min) for a beginner-friendly introduction!
239
-
240
340
  Looking for hard numbers? See OS-specific [Performance Benchmarks](docs/architecture/performance.md).
241
341
 
242
342
  ## Why DxMessaging
@@ -258,7 +358,7 @@ public class GameUI : MonoBehaviour {
258
358
 
259
359
  Months later: "Why is our game using 2GB of RAM after an hour?"
260
360
 
261
- ##### Scenario 2: The Spaghetti Mess
361
+ #### Scenario 2: The Spaghetti Mess
262
362
 
263
363
  ```csharp
264
364
  public class GameUI : MonoBehaviour {
@@ -281,7 +381,7 @@ public class GameUI : MonoBehaviour {
281
381
 
282
382
  **Your UI now depends on many systems.** Refactoring becomes more difficult.
283
383
 
284
- ###### Scenario 3: The Debugging Black Hole
384
+ #### Scenario 3: The Debugging Black Hole
285
385
 
286
386
  Player reports: "My health bar didn't update!"
287
387
 
@@ -318,7 +418,7 @@ public class GameUI : MessageAwareComponent {
318
418
 
319
419
  ###### Automatic lifecycle = leaks are prevented by default
320
420
 
321
- ###### Scenario 2: No More Coupling
421
+ ##### Scenario 2: No More Coupling
322
422
 
323
423
  ```csharp
324
424
  public class GameUI : MessageAwareComponent {
@@ -336,7 +436,7 @@ public class GameUI : MessageAwareComponent {
336
436
 
337
437
  **Your UI is now independent.** Swapping systems no longer requires updating UI references.
338
438
 
339
- ###### Scenario 3: Debugging is Built In
439
+ ##### Scenario 3: Debugging is Built In
340
440
 
341
441
  Open any `MessageAwareComponent` in the Inspector:
342
442
 
@@ -747,7 +847,7 @@ For OS-specific benchmark tables generated by PlayMode tests, see [Performance B
747
847
  | **Interceptors** | βœ… Pipeline | ❌ No | ⚠️ Filters | ❌ No |
748
848
  | **Post-Processing** | βœ… Dedicated | ❌ No | ⚠️ Filters | ❌ No |
749
849
  | **Stream Operators** | ❌ No | βœ… Extensive | ❌ No | ⚠️ With UniRx |
750
- | **Performance** | βœ… Good (14M) | βœ… Good (18M) | βœ… High (97M) | ⚠️ Moderate (2.5M) |
850
+ | **Performance** | βœ… Good (10-17M) | βœ… Good (18M) | βœ… High (97M) | ⚠️ Moderate (2.5M) |
751
851
  | **Dependencies** | βœ… None | ⚠️ UniTask | βœ… None | ⚠️ Zenject |
752
852
 
753
853
  ### Comparison with Traditional Approaches
@@ -107,7 +107,7 @@
107
107
  <!-- Version badge (top right) - text must contain vX.Y.Z for version sync -->
108
108
  <g transform="translate(720, 25)">
109
109
  <rect x="0" y="-12" width="60" height="22" rx="11" fill="#e94560" filter="url(#softShadow)"/>
110
- <text x="30" y="4" text-anchor="middle" font-family="'SF Mono', 'Fira Code', monospace" font-size="12" font-weight="600" fill="#ffffff" letter-spacing="0.5">v2.1.6</text>
110
+ <text x="30" y="4" text-anchor="middle" font-family="'SF Mono', 'Fira Code', monospace" font-size="12" font-weight="600" fill="#ffffff" letter-spacing="0.5">v2.1.7</text>
111
111
  </g>
112
112
 
113
113
  <!-- Wallstop Studios branding (bottom right) -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.wallstop-studios.dxmessaging",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "displayName": "DxMessaging",
5
5
  "description": "Synchronous Event Bus for Unity",
6
6
  "unity": "2021.3",
@@ -28,7 +28,7 @@
28
28
  "url": "https://github.com/wallstop/DxMessaging/issues"
29
29
  },
30
30
  "author": "wallstop studios <wallstop@wallstopstudios.com> (https://wallstopstudios.com)",
31
- "homepage": "https://github.com/wallstop/DxMessaging#readme",
31
+ "homepage": "https://wallstop.github.io/DxMessaging/",
32
32
  "main": "README.md",
33
33
  "scripts": {
34
34
  "test": "jest",
@@ -58,6 +58,11 @@
58
58
  "displayName": "UI Buttons + Inspector",
59
59
  "description": "UI-driven message emissions and a global observer demonstrating inspector diagnostics and RegisterGlobalAcceptAll.",
60
60
  "path": "Samples~/UI Buttons + Inspector"
61
+ },
62
+ {
63
+ "displayName": "Dependency Injection",
64
+ "description": "Integration samples for Zenject, VContainer, and Reflex showing IMessageRegistrationBuilder usage with container lifecycles.",
65
+ "path": "Samples~/DI"
61
66
  }
62
67
  ]
63
68
  }
@@ -1,14 +1,7 @@
1
1
  fileFormatVersion: 2
2
-
3
- guid: 0b5a7c4d3e6f8901cdef0123456703
4
-
2
+ guid: c45e837d8e5cf524b99889d6ee8ce71c
5
3
  DefaultImporter:
6
-
7
4
  externalObjects: {}
8
-
9
5
  userData:
10
-
11
6
  assetBundleName:
12
-
13
7
  assetBundleVariant:
14
-
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 9a4f6b3c2d5e7890bcdef0123456702
2
+ guid: 11b8f70083ca290428cfe7a9cb8a659e
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData: