com.wallstop-studios.dxmessaging 1.0.5 → 2.0.0-rc01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Analyzers/Microsoft.CodeAnalysis.dll +0 -0
- package/Analyzers/Microsoft.CodeAnalysis.dll.meta +33 -0
- package/Analyzers/Microsoft.CodeAnalysis.pdb.meta +7 -0
- package/Analyzers/Microsoft.CodeAnalysis.xml +38823 -0
- package/Analyzers/Microsoft.CodeAnalysis.xml.meta +7 -0
- package/Analyzers/System.Reflection.Metadata.dll +0 -0
- package/Analyzers/System.Reflection.Metadata.dll.meta +33 -0
- package/Analyzers/System.Reflection.Metadata.xml +8202 -0
- package/Analyzers/System.Reflection.Metadata.xml.meta +7 -0
- package/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.deps.json +319 -0
- package/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.deps.json.meta +7 -0
- package/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll +0 -0
- package/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll.meta +69 -0
- package/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.pdb.meta +7 -0
- package/Analyzers.meta +8 -0
- package/Editor/SetupCscRsp.cs +67 -0
- package/Editor/SetupCscRsp.cs.meta +3 -0
- package/Editor/WallstopStudios.DxMessaging.Editor.asmdef +21 -0
- package/{Tests/Editor/WallstopStudios.DxMessaging.Tests.Editor.asmdef.meta → Editor/WallstopStudios.DxMessaging.Editor.asmdef.meta} +7 -7
- package/README.md +43 -6
- package/Runtime/Core/Attributes/DxAutoMessageTypeAttribute.cs +9 -0
- package/Runtime/Core/Attributes/DxAutoMessageTypeAttribute.cs.meta +3 -0
- package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs +10 -0
- package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +3 -0
- package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs +10 -0
- package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +3 -0
- package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs +10 -0
- package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +3 -0
- package/Runtime/Core/Attributes.meta +3 -0
- package/Runtime/Unity/MessagingComponent.cs +21 -10
- package/Runtime/WallstopStudios.DxMessaging.asmdef +15 -17
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoMessageTypeGenerator.cs +75 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoMessageTypeGenerator.cs.meta +11 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxBroadcastMessageGenerator.cs +77 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxBroadcastMessageGenerator.cs.meta +3 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxTargetedMessageGenerator.cs +77 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxTargetedMessageGenerator.cs.meta +3 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxUntargetedMessageGenerator.cs +78 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxUntargetedMessageGenerator.cs.meta +3 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj +21 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj.meta +7 -0
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.meta +8 -0
- package/SourceGenerators.meta +8 -0
- package/Tests/Runtime/Core/NominalTests.cs +127 -77
- package/Tests/Runtime/Core/RegistrationTests.cs +56 -106
- package/Tests/Runtime/Scripts/Messages/ComplexTargetedMessage.cs +4 -2
- package/Tests/Runtime/Scripts/Messages/SimpleBroadcastMessage.cs +3 -3
- package/Tests/Runtime/Scripts/Messages/SimpleTargetedMessage.cs +4 -4
- package/Tests/Runtime/Scripts/Messages/SimpleUntargetedMessage.cs +3 -3
- package/Tests/Runtime/WallstopStudios.DxMessaging.Tests.Runtime.asmdef +1 -3
- package/package.json +3 -3
- package/Tests/Editor/WallstopStudios.DxMessaging.Tests.Editor.asmdef +0 -23
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeTarget": {
|
|
3
|
+
"name": ".NETStandard,Version=v2.0/",
|
|
4
|
+
"signature": ""
|
|
5
|
+
},
|
|
6
|
+
"compilationOptions": {},
|
|
7
|
+
"targets": {
|
|
8
|
+
".NETStandard,Version=v2.0": {},
|
|
9
|
+
".NETStandard,Version=v2.0/": {
|
|
10
|
+
"WallstopStudios.DxMessaging.SourceGenerators/1.0.0": {
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"Microsoft.CodeAnalysis.Analyzers": "3.3.1",
|
|
13
|
+
"Microsoft.CodeAnalysis.CSharp": "3.8.0",
|
|
14
|
+
"NETStandard.Library": "2.0.3",
|
|
15
|
+
"System.Collections.Immutable": "5.0.0"
|
|
16
|
+
},
|
|
17
|
+
"runtime": {
|
|
18
|
+
"WallstopStudios.DxMessaging.SourceGenerators.dll": {}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"Microsoft.CodeAnalysis.Analyzers/3.3.1": {},
|
|
22
|
+
"Microsoft.CodeAnalysis.Common/3.8.0": {
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"Microsoft.CodeAnalysis.Analyzers": "3.3.1",
|
|
25
|
+
"System.Collections.Immutable": "5.0.0",
|
|
26
|
+
"System.Memory": "4.5.4",
|
|
27
|
+
"System.Reflection.Metadata": "5.0.0",
|
|
28
|
+
"System.Runtime.CompilerServices.Unsafe": "4.7.1",
|
|
29
|
+
"System.Text.Encoding.CodePages": "4.5.1",
|
|
30
|
+
"System.Threading.Tasks.Extensions": "4.5.4"
|
|
31
|
+
},
|
|
32
|
+
"runtime": {
|
|
33
|
+
"lib/netstandard2.0/Microsoft.CodeAnalysis.dll": {
|
|
34
|
+
"assemblyVersion": "3.8.0.0",
|
|
35
|
+
"fileVersion": "3.800.20.56202"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"resources": {
|
|
39
|
+
"lib/netstandard2.0/cs/Microsoft.CodeAnalysis.resources.dll": {
|
|
40
|
+
"locale": "cs"
|
|
41
|
+
},
|
|
42
|
+
"lib/netstandard2.0/de/Microsoft.CodeAnalysis.resources.dll": {
|
|
43
|
+
"locale": "de"
|
|
44
|
+
},
|
|
45
|
+
"lib/netstandard2.0/es/Microsoft.CodeAnalysis.resources.dll": {
|
|
46
|
+
"locale": "es"
|
|
47
|
+
},
|
|
48
|
+
"lib/netstandard2.0/fr/Microsoft.CodeAnalysis.resources.dll": {
|
|
49
|
+
"locale": "fr"
|
|
50
|
+
},
|
|
51
|
+
"lib/netstandard2.0/it/Microsoft.CodeAnalysis.resources.dll": {
|
|
52
|
+
"locale": "it"
|
|
53
|
+
},
|
|
54
|
+
"lib/netstandard2.0/ja/Microsoft.CodeAnalysis.resources.dll": {
|
|
55
|
+
"locale": "ja"
|
|
56
|
+
},
|
|
57
|
+
"lib/netstandard2.0/ko/Microsoft.CodeAnalysis.resources.dll": {
|
|
58
|
+
"locale": "ko"
|
|
59
|
+
},
|
|
60
|
+
"lib/netstandard2.0/pl/Microsoft.CodeAnalysis.resources.dll": {
|
|
61
|
+
"locale": "pl"
|
|
62
|
+
},
|
|
63
|
+
"lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.resources.dll": {
|
|
64
|
+
"locale": "pt-BR"
|
|
65
|
+
},
|
|
66
|
+
"lib/netstandard2.0/ru/Microsoft.CodeAnalysis.resources.dll": {
|
|
67
|
+
"locale": "ru"
|
|
68
|
+
},
|
|
69
|
+
"lib/netstandard2.0/tr/Microsoft.CodeAnalysis.resources.dll": {
|
|
70
|
+
"locale": "tr"
|
|
71
|
+
},
|
|
72
|
+
"lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.resources.dll": {
|
|
73
|
+
"locale": "zh-Hans"
|
|
74
|
+
},
|
|
75
|
+
"lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.resources.dll": {
|
|
76
|
+
"locale": "zh-Hant"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"Microsoft.CodeAnalysis.CSharp/3.8.0": {
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"Microsoft.CodeAnalysis.Common": "3.8.0"
|
|
83
|
+
},
|
|
84
|
+
"runtime": {
|
|
85
|
+
"lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.dll": {
|
|
86
|
+
"assemblyVersion": "3.8.0.0",
|
|
87
|
+
"fileVersion": "3.800.20.56202"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"resources": {
|
|
91
|
+
"lib/netstandard2.0/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
92
|
+
"locale": "cs"
|
|
93
|
+
},
|
|
94
|
+
"lib/netstandard2.0/de/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
95
|
+
"locale": "de"
|
|
96
|
+
},
|
|
97
|
+
"lib/netstandard2.0/es/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
98
|
+
"locale": "es"
|
|
99
|
+
},
|
|
100
|
+
"lib/netstandard2.0/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
101
|
+
"locale": "fr"
|
|
102
|
+
},
|
|
103
|
+
"lib/netstandard2.0/it/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
104
|
+
"locale": "it"
|
|
105
|
+
},
|
|
106
|
+
"lib/netstandard2.0/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
107
|
+
"locale": "ja"
|
|
108
|
+
},
|
|
109
|
+
"lib/netstandard2.0/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
110
|
+
"locale": "ko"
|
|
111
|
+
},
|
|
112
|
+
"lib/netstandard2.0/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
113
|
+
"locale": "pl"
|
|
114
|
+
},
|
|
115
|
+
"lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
116
|
+
"locale": "pt-BR"
|
|
117
|
+
},
|
|
118
|
+
"lib/netstandard2.0/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
119
|
+
"locale": "ru"
|
|
120
|
+
},
|
|
121
|
+
"lib/netstandard2.0/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
122
|
+
"locale": "tr"
|
|
123
|
+
},
|
|
124
|
+
"lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
125
|
+
"locale": "zh-Hans"
|
|
126
|
+
},
|
|
127
|
+
"lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
|
128
|
+
"locale": "zh-Hant"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"Microsoft.NETCore.Platforms/1.1.0": {},
|
|
133
|
+
"NETStandard.Library/2.0.3": {
|
|
134
|
+
"dependencies": {
|
|
135
|
+
"Microsoft.NETCore.Platforms": "1.1.0"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"System.Buffers/4.5.1": {
|
|
139
|
+
"runtime": {
|
|
140
|
+
"lib/netstandard2.0/System.Buffers.dll": {
|
|
141
|
+
"assemblyVersion": "4.0.3.0",
|
|
142
|
+
"fileVersion": "4.6.28619.1"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"System.Collections.Immutable/5.0.0": {
|
|
147
|
+
"dependencies": {
|
|
148
|
+
"System.Memory": "4.5.4"
|
|
149
|
+
},
|
|
150
|
+
"runtime": {
|
|
151
|
+
"lib/netstandard2.0/System.Collections.Immutable.dll": {
|
|
152
|
+
"assemblyVersion": "5.0.0.0",
|
|
153
|
+
"fileVersion": "5.0.20.51904"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"System.Memory/4.5.4": {
|
|
158
|
+
"dependencies": {
|
|
159
|
+
"System.Buffers": "4.5.1",
|
|
160
|
+
"System.Numerics.Vectors": "4.4.0",
|
|
161
|
+
"System.Runtime.CompilerServices.Unsafe": "4.7.1"
|
|
162
|
+
},
|
|
163
|
+
"runtime": {
|
|
164
|
+
"lib/netstandard2.0/System.Memory.dll": {
|
|
165
|
+
"assemblyVersion": "4.0.1.1",
|
|
166
|
+
"fileVersion": "4.6.28619.1"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"System.Numerics.Vectors/4.4.0": {
|
|
171
|
+
"runtime": {
|
|
172
|
+
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
|
|
173
|
+
"assemblyVersion": "4.1.3.0",
|
|
174
|
+
"fileVersion": "4.6.25519.3"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"System.Reflection.Metadata/5.0.0": {
|
|
179
|
+
"dependencies": {
|
|
180
|
+
"System.Collections.Immutable": "5.0.0"
|
|
181
|
+
},
|
|
182
|
+
"runtime": {
|
|
183
|
+
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
|
|
184
|
+
"assemblyVersion": "5.0.0.0",
|
|
185
|
+
"fileVersion": "5.0.20.51904"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"System.Runtime.CompilerServices.Unsafe/4.7.1": {
|
|
190
|
+
"runtime": {
|
|
191
|
+
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
|
192
|
+
"assemblyVersion": "4.0.6.0",
|
|
193
|
+
"fileVersion": "4.700.20.12001"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"System.Text.Encoding.CodePages/4.5.1": {
|
|
198
|
+
"dependencies": {
|
|
199
|
+
"System.Runtime.CompilerServices.Unsafe": "4.7.1"
|
|
200
|
+
},
|
|
201
|
+
"runtime": {
|
|
202
|
+
"lib/netstandard2.0/System.Text.Encoding.CodePages.dll": {
|
|
203
|
+
"assemblyVersion": "4.1.1.0",
|
|
204
|
+
"fileVersion": "4.6.27129.4"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"System.Threading.Tasks.Extensions/4.5.4": {
|
|
209
|
+
"dependencies": {
|
|
210
|
+
"System.Runtime.CompilerServices.Unsafe": "4.7.1"
|
|
211
|
+
},
|
|
212
|
+
"runtime": {
|
|
213
|
+
"lib/netstandard2.0/System.Threading.Tasks.Extensions.dll": {
|
|
214
|
+
"assemblyVersion": "4.2.0.1",
|
|
215
|
+
"fileVersion": "4.6.28619.1"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"libraries": {
|
|
222
|
+
"WallstopStudios.DxMessaging.SourceGenerators/1.0.0": {
|
|
223
|
+
"type": "project",
|
|
224
|
+
"serviceable": false,
|
|
225
|
+
"sha512": ""
|
|
226
|
+
},
|
|
227
|
+
"Microsoft.CodeAnalysis.Analyzers/3.3.1": {
|
|
228
|
+
"type": "package",
|
|
229
|
+
"serviceable": true,
|
|
230
|
+
"sha512": "sha512-xJBuqrO6P6a9O9BOtzGzQo4E8ZTNY4iygpzO5AAQzo9sKA/siX4+jvW1UFVlXpRdh3mirY/PMYu57vjGSw2ezg==",
|
|
231
|
+
"path": "microsoft.codeanalysis.analyzers/3.3.1",
|
|
232
|
+
"hashPath": "microsoft.codeanalysis.analyzers.3.3.1.nupkg.sha512"
|
|
233
|
+
},
|
|
234
|
+
"Microsoft.CodeAnalysis.Common/3.8.0": {
|
|
235
|
+
"type": "package",
|
|
236
|
+
"serviceable": true,
|
|
237
|
+
"sha512": "sha512-8YTZ7GpsbTdC08DITx7/kwV0k4SC6cbBAFqc13cOm5vKJZcEIAh51tNSyGSkWisMgYCr96B2wb5Zri1bsla3+g==",
|
|
238
|
+
"path": "microsoft.codeanalysis.common/3.8.0",
|
|
239
|
+
"hashPath": "microsoft.codeanalysis.common.3.8.0.nupkg.sha512"
|
|
240
|
+
},
|
|
241
|
+
"Microsoft.CodeAnalysis.CSharp/3.8.0": {
|
|
242
|
+
"type": "package",
|
|
243
|
+
"serviceable": true,
|
|
244
|
+
"sha512": "sha512-hKqFCUSk9TIMBDjiYMF8/ZfK9p9mzpU+slM73CaCHu4ctfkoqJGHLQhyT8wvrYsIg+ufrUWBF8hcJYmyr5rc5Q==",
|
|
245
|
+
"path": "microsoft.codeanalysis.csharp/3.8.0",
|
|
246
|
+
"hashPath": "microsoft.codeanalysis.csharp.3.8.0.nupkg.sha512"
|
|
247
|
+
},
|
|
248
|
+
"Microsoft.NETCore.Platforms/1.1.0": {
|
|
249
|
+
"type": "package",
|
|
250
|
+
"serviceable": true,
|
|
251
|
+
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
|
252
|
+
"path": "microsoft.netcore.platforms/1.1.0",
|
|
253
|
+
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
|
254
|
+
},
|
|
255
|
+
"NETStandard.Library/2.0.3": {
|
|
256
|
+
"type": "package",
|
|
257
|
+
"serviceable": true,
|
|
258
|
+
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
|
259
|
+
"path": "netstandard.library/2.0.3",
|
|
260
|
+
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
|
261
|
+
},
|
|
262
|
+
"System.Buffers/4.5.1": {
|
|
263
|
+
"type": "package",
|
|
264
|
+
"serviceable": true,
|
|
265
|
+
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
|
266
|
+
"path": "system.buffers/4.5.1",
|
|
267
|
+
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
|
268
|
+
},
|
|
269
|
+
"System.Collections.Immutable/5.0.0": {
|
|
270
|
+
"type": "package",
|
|
271
|
+
"serviceable": true,
|
|
272
|
+
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
|
|
273
|
+
"path": "system.collections.immutable/5.0.0",
|
|
274
|
+
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
|
|
275
|
+
},
|
|
276
|
+
"System.Memory/4.5.4": {
|
|
277
|
+
"type": "package",
|
|
278
|
+
"serviceable": true,
|
|
279
|
+
"sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
|
|
280
|
+
"path": "system.memory/4.5.4",
|
|
281
|
+
"hashPath": "system.memory.4.5.4.nupkg.sha512"
|
|
282
|
+
},
|
|
283
|
+
"System.Numerics.Vectors/4.4.0": {
|
|
284
|
+
"type": "package",
|
|
285
|
+
"serviceable": true,
|
|
286
|
+
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
|
|
287
|
+
"path": "system.numerics.vectors/4.4.0",
|
|
288
|
+
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
|
|
289
|
+
},
|
|
290
|
+
"System.Reflection.Metadata/5.0.0": {
|
|
291
|
+
"type": "package",
|
|
292
|
+
"serviceable": true,
|
|
293
|
+
"sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
|
|
294
|
+
"path": "system.reflection.metadata/5.0.0",
|
|
295
|
+
"hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512"
|
|
296
|
+
},
|
|
297
|
+
"System.Runtime.CompilerServices.Unsafe/4.7.1": {
|
|
298
|
+
"type": "package",
|
|
299
|
+
"serviceable": true,
|
|
300
|
+
"sha512": "sha512-zOHkQmzPCn5zm/BH+cxC1XbUS3P4Yoi3xzW7eRgVpDR2tPGSzyMZ17Ig1iRkfJuY0nhxkQQde8pgePNiA7z7TQ==",
|
|
301
|
+
"path": "system.runtime.compilerservices.unsafe/4.7.1",
|
|
302
|
+
"hashPath": "system.runtime.compilerservices.unsafe.4.7.1.nupkg.sha512"
|
|
303
|
+
},
|
|
304
|
+
"System.Text.Encoding.CodePages/4.5.1": {
|
|
305
|
+
"type": "package",
|
|
306
|
+
"serviceable": true,
|
|
307
|
+
"sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==",
|
|
308
|
+
"path": "system.text.encoding.codepages/4.5.1",
|
|
309
|
+
"hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512"
|
|
310
|
+
},
|
|
311
|
+
"System.Threading.Tasks.Extensions/4.5.4": {
|
|
312
|
+
"type": "package",
|
|
313
|
+
"serviceable": true,
|
|
314
|
+
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
|
|
315
|
+
"path": "system.threading.tasks.extensions/4.5.4",
|
|
316
|
+
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 6276058efb4d05248b64a4295f60baf6
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 1
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Editor: 1
|
|
20
|
+
Exclude Linux64: 1
|
|
21
|
+
Exclude OSXUniversal: 1
|
|
22
|
+
Exclude Win: 1
|
|
23
|
+
Exclude Win64: 1
|
|
24
|
+
- first:
|
|
25
|
+
Any:
|
|
26
|
+
second:
|
|
27
|
+
enabled: 0
|
|
28
|
+
settings: {}
|
|
29
|
+
- first:
|
|
30
|
+
Editor: Editor
|
|
31
|
+
second:
|
|
32
|
+
enabled: 0
|
|
33
|
+
settings:
|
|
34
|
+
CPU: AnyCPU
|
|
35
|
+
DefaultValueInitialized: true
|
|
36
|
+
OS: AnyOS
|
|
37
|
+
- first:
|
|
38
|
+
Standalone: Linux64
|
|
39
|
+
second:
|
|
40
|
+
enabled: 0
|
|
41
|
+
settings:
|
|
42
|
+
CPU: AnyCPU
|
|
43
|
+
- first:
|
|
44
|
+
Standalone: OSXUniversal
|
|
45
|
+
second:
|
|
46
|
+
enabled: 0
|
|
47
|
+
settings:
|
|
48
|
+
CPU: None
|
|
49
|
+
- first:
|
|
50
|
+
Standalone: Win
|
|
51
|
+
second:
|
|
52
|
+
enabled: 0
|
|
53
|
+
settings:
|
|
54
|
+
CPU: x86
|
|
55
|
+
- first:
|
|
56
|
+
Standalone: Win64
|
|
57
|
+
second:
|
|
58
|
+
enabled: 0
|
|
59
|
+
settings:
|
|
60
|
+
CPU: x86_64
|
|
61
|
+
- first:
|
|
62
|
+
Windows Store Apps: WindowsStoreApps
|
|
63
|
+
second:
|
|
64
|
+
enabled: 0
|
|
65
|
+
settings:
|
|
66
|
+
CPU: AnyCPU
|
|
67
|
+
userData:
|
|
68
|
+
assetBundleName: roslynanalyzer
|
|
69
|
+
assetBundleVariant: roslynanalyzer
|
package/Analyzers.meta
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#if UNITY_EDITOR
|
|
2
|
+
|
|
3
|
+
namespace DxMessaging.Editor
|
|
4
|
+
{
|
|
5
|
+
using System.IO;
|
|
6
|
+
using UnityEditor;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
[InitializeOnLoad]
|
|
10
|
+
public static class SetupCscRsp
|
|
11
|
+
{
|
|
12
|
+
private static readonly string RspFilePath =
|
|
13
|
+
Path.Combine(Application.dataPath, "..", "csc.rsp").Replace("\\", "/");
|
|
14
|
+
|
|
15
|
+
private static readonly string AnalyzerPathRelative =
|
|
16
|
+
"Packages/com.wallstop-studios.dxmessaging/Editor/RoslynAnalyzers/WallstopStudios.DxMessaging.SourceGenerators.dll";
|
|
17
|
+
|
|
18
|
+
private static readonly string LibraryPathRelative =
|
|
19
|
+
"Library/PackageCache/com.wallstop-studios.dxmessaging/Editor/RoslynAnalyzers/WallstopStudios.DxMessaging.SourceGenerators.dll";
|
|
20
|
+
|
|
21
|
+
private static readonly string AnalyzerArgument = $"-a:\"{AnalyzerPathRelative}\"";
|
|
22
|
+
|
|
23
|
+
private static readonly string LibraryArgument = $"-a:\"{LibraryPathRelative}\"";
|
|
24
|
+
|
|
25
|
+
static SetupCscRsp()
|
|
26
|
+
{
|
|
27
|
+
EditorApplication.delayCall += EnsureCscRsp;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private static void EnsureCscRsp()
|
|
31
|
+
{
|
|
32
|
+
try
|
|
33
|
+
{
|
|
34
|
+
if (!File.Exists(RspFilePath))
|
|
35
|
+
{
|
|
36
|
+
File.WriteAllText(RspFilePath, string.Empty);
|
|
37
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
string rspContent = File.ReadAllText(RspFilePath);
|
|
41
|
+
|
|
42
|
+
string[] paths = { AnalyzerArgument, LibraryArgument };
|
|
43
|
+
bool changed = false;
|
|
44
|
+
foreach (string path in paths)
|
|
45
|
+
{
|
|
46
|
+
if (!rspContent.Contains(path))
|
|
47
|
+
{
|
|
48
|
+
// Append the analyzer argument to csc.rsp
|
|
49
|
+
File.AppendAllText(RspFilePath, $"{path}\n");
|
|
50
|
+
changed = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (changed)
|
|
55
|
+
{
|
|
56
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
57
|
+
Debug.Log("Updated csc.rsp.");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (IOException ex)
|
|
61
|
+
{
|
|
62
|
+
Debug.LogError($"Failed to modify csc.rsp: {ex}");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
#endif
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "WallstopStudios.DxMessaging.Editor",
|
|
3
|
+
"rootNamespace": "DxMessaging.Editor",
|
|
4
|
+
"references": [
|
|
5
|
+
"WallstopStudios.DxMessaging"
|
|
6
|
+
],
|
|
7
|
+
"includePlatforms": [],
|
|
8
|
+
"excludePlatforms": [],
|
|
9
|
+
"allowUnsafeCode": true,
|
|
10
|
+
"overrideReferences": true,
|
|
11
|
+
"precompiledReferences": [
|
|
12
|
+
"Microsoft.CodeAnalysis.dll",
|
|
13
|
+
"System.Collections.Immutable.dll",
|
|
14
|
+
"System.Runtime.CompilerServices.Unsafe.dll",
|
|
15
|
+
"System.Reflection.Metadata.dll"
|
|
16
|
+
],
|
|
17
|
+
"autoReferenced": false,
|
|
18
|
+
"defineConstraints": [],
|
|
19
|
+
"versionDefines": [],
|
|
20
|
+
"noEngineReferences": false
|
|
21
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid:
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 4be90ea11db262f43913b0e065a25c7f
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/README.md
CHANGED
|
@@ -17,12 +17,12 @@ This project has a dependency on my [`Unity Helpers`](https://github.com/wallsto
|
|
|
17
17
|
DxMessaging is currently a bit slower (2-3x) than Unity's built in messaging solution (when running in Unity). [Source](./Tests/Runtime/Benchmarks/PerformanceTests.cs).
|
|
18
18
|
| Message Tech | Operations / Second |
|
|
19
19
|
| ------------ | ------------------- |
|
|
20
|
-
| Unity | 1,
|
|
21
|
-
| DxMessaging (GameObject) - Normal |
|
|
22
|
-
| DxMessaging (Component) - Normal |
|
|
23
|
-
| DxMessaging (GameObject) - No-Copy |
|
|
24
|
-
| DxMessaging (Component) - No-Copy |
|
|
25
|
-
| DxMessaging (Untargeted) - No-Copy | 1,
|
|
20
|
+
| Unity | 1,876,433 |
|
|
21
|
+
| DxMessaging (GameObject) - Normal | 879,683 |
|
|
22
|
+
| DxMessaging (Component) - Normal | 868,487 |
|
|
23
|
+
| DxMessaging (GameObject) - No-Copy | 872,565 |
|
|
24
|
+
| DxMessaging (Component) - No-Copy | 898,447 |
|
|
25
|
+
| DxMessaging (Untargeted) - No-Copy | 1,229,450 |
|
|
26
26
|
|
|
27
27
|
# Functionality
|
|
28
28
|
While not as fast, DxMessaging offers *additional functionality* as compared to Unity's messaging solution.
|
|
@@ -69,6 +69,43 @@ Please note, if you want to receive messages and inherit off of the `MessageAwar
|
|
|
69
69
|
|
|
70
70
|
If you wish to use any of these methods in components that inherit from `MessageAwareComponent`, please make sure to have the overrides call the base methods, otherwise messaging *may break* or not work as expected.
|
|
71
71
|
|
|
72
|
+
## Integration - Source Generators (v2 and above)
|
|
73
|
+
I'm piloting some new tech in version 2 of this library. Currently, if implementing any of the message interfaces, there will be boxing performed on the messages, if they are structs. This is due to the nature of default interface methods, which I was not aware of.
|
|
74
|
+
|
|
75
|
+
To get around this, I have updated both the Unity Helpers dependent package, as well as this package, to take advantage of Roslyn Source Generators.
|
|
76
|
+
|
|
77
|
+
Requirements:
|
|
78
|
+
1. Use one of `DxTargetedMessage, DxBroadcastMessage, DxUntargetedMessage` depending on message requirement.
|
|
79
|
+
2. Ensure that the struct or class is marked as `partial`.
|
|
80
|
+
|
|
81
|
+
To use:
|
|
82
|
+
```csharp
|
|
83
|
+
[DxTargetedMessage]
|
|
84
|
+
public partial struct SimpleTargetedMessage // No longer needed : ITargetedMessage<SimpleTargetedMessage>
|
|
85
|
+
{
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[DxBroadcastMessage]
|
|
89
|
+
public partial struct SimpleBroadcastMessage // No longer needed : IBroadcastMessage<SimpleBroadcastMessage>
|
|
90
|
+
{
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[DxUntargetedMessage]
|
|
94
|
+
public partial struct SimpleUntargetedMessage // No longer needed : IUntargetedMesssage<SimpleUntargetedMessage>
|
|
95
|
+
{
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Or, if you already have messages, you can leave the interface implementations as-is and get a no-boxing implementation with the `DxAutoMessageType` attribute. `partial` is still required.
|
|
100
|
+
|
|
101
|
+
To use:
|
|
102
|
+
```csharp
|
|
103
|
+
[DxAutoMessageType]
|
|
104
|
+
public partial struct SimpleTargetedMessage : ITargetedMessage<SimpleTargetedMessage>
|
|
105
|
+
{
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
72
109
|
## Integration
|
|
73
110
|
See the [tests](./Tests/Runtime/Scripts/) directory for examples about how to integrate with the MessageAwareComponent. But, for some starters:
|
|
74
111
|
```csharp
|