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.
- package/CHANGELOG.md +315 -67
- package/CHANGELOG.md.meta +7 -7
- package/Editor/Analyzers/BaseCallIlInspector.cs +277 -0
- package/Editor/Analyzers/BaseCallIlInspector.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallLogMessageParser.cs +295 -0
- package/Editor/Analyzers/BaseCallLogMessageParser.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallReportAggregator.cs +308 -0
- package/Editor/Analyzers/BaseCallReportAggregator.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallTypeScanner.cs +110 -0
- package/Editor/Analyzers/BaseCallTypeScanner.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallTypeScannerCore.cs +562 -0
- package/Editor/Analyzers/BaseCallTypeScannerCore.cs.meta +11 -0
- package/Editor/Analyzers/DxMessagingConsoleHarvester.cs +1129 -0
- package/Editor/Analyzers/DxMessagingConsoleHarvester.cs.meta +11 -0
- package/Editor/Analyzers/Microsoft.CodeAnalysis.CSharp.dll.meta +44 -44
- package/Editor/Analyzers/Microsoft.CodeAnalysis.dll.meta +44 -44
- package/Editor/Analyzers/System.Collections.Immutable.dll.meta +44 -44
- package/Editor/Analyzers/System.Reflection.Metadata.dll.meta +44 -44
- package/Editor/Analyzers/System.Runtime.CompilerServices.Unsafe.dll.meta +44 -44
- package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll +0 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll.meta +46 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll +0 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll.meta +72 -72
- package/Editor/Analyzers.meta +8 -8
- package/Editor/AssemblyInfo.cs.meta +11 -3
- package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs +81 -0
- package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs.meta +11 -0
- package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs +429 -0
- package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs.meta +11 -0
- package/Editor/CustomEditors/MessagingComponentEditor.cs +1 -1
- package/Editor/CustomEditors/MessagingComponentEditor.cs.meta +11 -3
- package/Editor/CustomEditors.meta +2 -2
- package/Editor/DxMessagingEditorIdle.cs +62 -0
- package/Editor/DxMessagingEditorIdle.cs.meta +11 -0
- package/Editor/DxMessagingEditorInitializer.cs +112 -15
- package/Editor/DxMessagingEditorInitializer.cs.meta +11 -3
- package/Editor/DxMessagingEditorLog.cs +32 -0
- package/Editor/DxMessagingEditorLog.cs.meta +11 -0
- package/Editor/DxMessagingMenu.cs.meta +11 -11
- package/Editor/DxMessagingSceneBuildProcessor.cs.meta +11 -11
- package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs +313 -0
- package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs.meta +11 -0
- package/Editor/Settings/DxMessagingSettings.cs +261 -11
- package/Editor/Settings/DxMessagingSettings.cs.meta +11 -3
- package/Editor/Settings/DxMessagingSettingsProvider.cs +50 -33
- package/Editor/Settings/DxMessagingSettingsProvider.cs.meta +11 -3
- package/Editor/Settings.meta +2 -2
- package/Editor/SetupCscRsp.cs +406 -39
- package/Editor/SetupCscRsp.cs.meta +11 -3
- package/Editor/Testing/MessagingComponentEditorHarness.cs +2 -2
- package/Editor/Testing/MessagingComponentEditorHarness.cs.meta +11 -3
- package/Editor/Testing.meta +3 -3
- package/Editor/WallstopStudios.DxMessaging.Editor.asmdef +14 -14
- package/Editor/WallstopStudios.DxMessaging.Editor.asmdef.meta +7 -7
- package/Editor.meta +8 -8
- package/LICENSE.md +9 -9
- package/LICENSE.md.meta +7 -7
- package/README.md +940 -900
- package/README.md.meta +7 -7
- package/Runtime/AssemblyInfo.cs +4 -0
- package/Runtime/AssemblyInfo.cs.meta +11 -3
- package/Runtime/Core/Attributes/DxAutoConstructorAttribute.cs.meta +11 -3
- package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +11 -3
- package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs +26 -0
- package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs.meta +11 -0
- package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs +2 -4
- package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs.meta +11 -3
- package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +11 -3
- package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +11 -3
- package/Runtime/Core/Attributes/Il2CppSetOptionAttribute.cs +56 -0
- package/Runtime/Core/Attributes/Il2CppSetOptionAttribute.cs.meta +11 -0
- package/Runtime/Core/Attributes.meta +2 -2
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs +195 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs.meta +11 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs +179 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs.meta +11 -0
- package/Runtime/Core/Configuration.meta +9 -0
- package/Runtime/Core/DataStructure/CyclicBuffer.cs +46 -28
- package/Runtime/Core/DataStructure/CyclicBuffer.cs.meta +11 -3
- package/Runtime/Core/DataStructure.meta +2 -2
- package/Runtime/Core/Diagnostics/MessageEmissionData.cs.meta +11 -3
- package/Runtime/Core/Diagnostics/MessageRegistrationData.cs.meta +11 -3
- package/Runtime/Core/Diagnostics/MessageRegistrationType.cs.meta +11 -3
- package/Runtime/Core/Diagnostics.meta +2 -2
- package/Runtime/Core/DxMessagingStaticState.cs +19 -0
- package/Runtime/Core/DxMessagingStaticState.cs.meta +11 -11
- package/Runtime/Core/Extensions/EnumExtensions.cs +6 -5
- package/Runtime/Core/Extensions/EnumExtensions.cs.meta +11 -3
- package/Runtime/Core/Extensions/IListExtensions.cs.meta +11 -3
- package/Runtime/Core/Extensions/MessageBusExtensions.cs.meta +12 -12
- package/Runtime/Core/Extensions/MessageExtensions.cs +0 -60
- package/Runtime/Core/Extensions/MessageExtensions.cs.meta +11 -11
- package/Runtime/Core/Extensions.meta +8 -8
- package/Runtime/Core/Helper/MessageCache.cs +32 -0
- package/Runtime/Core/Helper/MessageCache.cs.meta +11 -3
- package/Runtime/Core/Helper/MessageHelperIndexer.cs.meta +11 -3
- package/Runtime/Core/Helper.meta +2 -2
- package/Runtime/Core/IMessage.cs +3 -3
- package/Runtime/Core/IMessage.cs.meta +11 -11
- package/Runtime/Core/InstanceId.cs +25 -1
- package/Runtime/Core/InstanceId.cs.meta +11 -11
- package/Runtime/Core/Internal/DxUnsafe.cs +60 -0
- package/Runtime/Core/Internal/DxUnsafe.cs.meta +11 -0
- package/Runtime/Core/Internal/FlatDispatch.cs +198 -0
- package/Runtime/Core/Internal/FlatDispatch.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs +38 -0
- package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedSlotIndex.cs +81 -0
- package/Runtime/Core/Internal/TypedSlotIndex.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedSlots.cs +597 -0
- package/Runtime/Core/Internal/TypedSlots.cs.meta +11 -0
- package/Runtime/Core/Internal.meta +9 -0
- package/Runtime/Core/MessageBus/DiagnosticsTarget.cs.meta +11 -11
- package/Runtime/Core/MessageBus/GlobalMessageBusProvider.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageBus.cs +189 -15
- package/Runtime/Core/MessageBus/IMessageBus.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageBusProvider.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageRegistrationBuilder.cs +1 -0
- package/Runtime/Core/MessageBus/IMessageRegistrationBuilder.cs.meta +11 -11
- package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs +16 -0
- package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs +40 -0
- package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/BusSlots.cs +719 -0
- package/Runtime/Core/MessageBus/Internal/BusSlots.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchKind.cs +38 -0
- package/Runtime/Core/MessageBus/Internal/DispatchKind.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs +20 -0
- package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs +28 -0
- package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs +48 -0
- package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/ISweepable.cs +15 -0
- package/Runtime/Core/MessageBus/Internal/ISweepable.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs +222 -0
- package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/SlotKey.cs +192 -0
- package/Runtime/Core/MessageBus/Internal/SlotKey.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal.meta +9 -0
- package/Runtime/Core/MessageBus/MessageBus.cs +5366 -3838
- package/Runtime/Core/MessageBus/MessageBus.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessageBusRebindMode.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessageRegistrationBuilder.cs +187 -14
- package/Runtime/Core/MessageBus/MessageRegistrationBuilder.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessagingRegistration.cs.meta +11 -11
- package/Runtime/Core/MessageBus/RegistrationLog.cs.meta +11 -11
- package/Runtime/Core/MessageBus.meta +8 -8
- package/Runtime/Core/MessageHandler.cs +2399 -1042
- package/Runtime/Core/MessageHandler.cs.meta +11 -11
- package/Runtime/Core/MessageRegistrationHandle.cs.meta +11 -11
- package/Runtime/Core/MessageRegistrationToken.cs +429 -44
- package/Runtime/Core/MessageRegistrationToken.cs.meta +11 -11
- package/Runtime/Core/Messages/GlobalStringMessage.cs.meta +11 -3
- package/Runtime/Core/Messages/IBroadcastMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/ITargetedMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/IUntargetedMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/ReflexiveMessage.cs.meta +11 -3
- package/Runtime/Core/Messages/SourcedStringMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/StringMessage.cs.meta +11 -3
- package/Runtime/Core/Messages.meta +8 -8
- package/Runtime/Core/MessagingDebug.cs.meta +11 -11
- package/Runtime/Core/Pooling/CollectionPool.cs +266 -0
- package/Runtime/Core/Pooling/CollectionPool.cs.meta +11 -0
- package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs +30 -0
- package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs.meta +11 -0
- package/Runtime/Core/Pooling/DxPools.cs +157 -0
- package/Runtime/Core/Pooling/DxPools.cs.meta +11 -0
- package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs +106 -0
- package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs.meta +11 -0
- package/Runtime/Core/Pooling/IDxMessagingClock.cs +18 -0
- package/Runtime/Core/Pooling/IDxMessagingClock.cs.meta +11 -0
- package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs +55 -0
- package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs.meta +11 -0
- package/Runtime/Core/Pooling/StopwatchClock.cs +27 -0
- package/Runtime/Core/Pooling/StopwatchClock.cs.meta +11 -0
- package/Runtime/Core/Pooling/UnityRealtimeClock.cs +31 -0
- package/Runtime/Core/Pooling/UnityRealtimeClock.cs.meta +11 -0
- package/Runtime/Core/Pooling.meta +9 -0
- package/Runtime/Core.meta +8 -8
- package/Runtime/Unity/CurrentGlobalMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity/DxMessagingRuntimeInitializer.cs.meta +11 -11
- package/Runtime/Unity/InitialGlobalMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity/Integrations/Reflex/AssemblyInfo.cs.meta +11 -3
- package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs +73 -0
- package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs.meta +11 -11
- package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef +20 -20
- package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/Reflex.meta +8 -8
- package/Runtime/Unity/Integrations/VContainer/AssemblyInfo.cs.meta +11 -3
- package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs +109 -1
- package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs.meta +11 -11
- package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef +30 -30
- package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/VContainer.meta +8 -8
- package/Runtime/Unity/Integrations/Zenject/AssemblyInfo.cs.meta +11 -3
- package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef +30 -30
- package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs +79 -1
- package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs.meta +11 -11
- package/Runtime/Unity/Integrations/Zenject.meta +8 -8
- package/Runtime/Unity/Integrations.meta +8 -8
- package/Runtime/Unity/MessageAwareComponent.cs +74 -0
- package/Runtime/Unity/MessageAwareComponent.cs.meta +11 -11
- package/Runtime/Unity/MessageBusProviderHandle.cs.meta +12 -12
- package/Runtime/Unity/MessagingComponent.cs +43 -10
- package/Runtime/Unity/MessagingComponent.cs.meta +11 -11
- package/Runtime/Unity/MessagingComponentInstaller.cs.meta +12 -12
- package/Runtime/Unity/ScriptableMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity.meta +8 -8
- package/Runtime/WallstopStudios.DxMessaging.asmdef +14 -14
- package/Runtime/WallstopStudios.DxMessaging.asmdef.meta +7 -7
- package/Runtime.meta +8 -8
- package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab +98 -98
- package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab.meta +7 -7
- package/Samples~/DI/Prefabs.meta +8 -8
- package/Samples~/DI/Providers/GlobalMessageBusProvider.asset +14 -14
- package/Samples~/DI/Providers/GlobalMessageBusProvider.asset.meta +8 -8
- package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset +14 -14
- package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset.meta +8 -8
- package/Samples~/DI/Providers.meta +8 -8
- package/Samples~/DI/README.md +51 -51
- package/Samples~/DI/README.md.meta +7 -7
- package/Samples~/DI/Reflex/SampleInstaller.cs +7 -0
- package/Samples~/DI/Reflex/SampleInstaller.cs.meta +11 -11
- package/Samples~/DI/Reflex.meta +8 -8
- package/Samples~/DI/VContainer/SampleLifetimeScope.cs +6 -1
- package/Samples~/DI/VContainer/SampleLifetimeScope.cs.meta +11 -11
- package/Samples~/DI/VContainer.meta +8 -8
- package/Samples~/DI/Zenject/SampleInstaller.cs +8 -0
- package/Samples~/DI/Zenject/SampleInstaller.cs.meta +11 -11
- package/Samples~/DI/Zenject.meta +8 -8
- package/Samples~/DI.meta +8 -8
- package/Samples~/Mini Combat/Boot.cs.meta +11 -11
- package/Samples~/Mini Combat/Enemy.cs.meta +11 -11
- package/Samples~/Mini Combat/Messages.cs.meta +11 -11
- package/Samples~/Mini Combat/Player.cs.meta +11 -11
- package/Samples~/Mini Combat/README.md +324 -323
- package/Samples~/Mini Combat/README.md.meta +7 -7
- package/Samples~/Mini Combat/UIOverlay.cs.meta +11 -11
- package/Samples~/Mini Combat/Walkthrough.md +430 -430
- package/Samples~/Mini Combat/Walkthrough.md.meta +7 -7
- package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef +13 -13
- package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef.meta +7 -7
- package/Samples~/Mini Combat.meta +8 -8
- package/Samples~/UI Buttons + Inspector/DiagnosticsEnabler.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/Messages.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/MessagingObserver.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/README.md +210 -209
- package/Samples~/UI Buttons + Inspector/README.md.meta +7 -7
- package/Samples~/UI Buttons + Inspector/UIButtonEmitter.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef +13 -13
- package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef.meta +7 -7
- package/Samples~/UI Buttons + Inspector.meta +8 -8
- package/SourceGenerators/Directory.Build.props +50 -3
- package/SourceGenerators/Directory.Build.props.meta +7 -7
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs +96 -63
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs.meta +11 -11
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs +745 -87
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs.meta +11 -3
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj +39 -46
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj.meta +7 -7
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.meta +8 -8
- package/SourceGenerators/global.json +7 -0
- package/SourceGenerators/global.json.meta +7 -0
- package/SourceGenerators.meta +8 -8
- package/Third Party Notices.md +3 -3
- package/Third Party Notices.md.meta +7 -7
- package/package.json +102 -92
- package/package.json.meta +7 -7
package/Editor/SetupCscRsp.cs
CHANGED
|
@@ -7,6 +7,7 @@ namespace DxMessaging.Editor
|
|
|
7
7
|
using System.IO;
|
|
8
8
|
using System.Linq;
|
|
9
9
|
using System.Security.Cryptography;
|
|
10
|
+
using DxMessaging.Editor.Settings;
|
|
10
11
|
using UnityEditor;
|
|
11
12
|
using UnityEngine;
|
|
12
13
|
using Object = UnityEngine.Object;
|
|
@@ -30,9 +31,19 @@ namespace DxMessaging.Editor
|
|
|
30
31
|
private static readonly string SourceGeneratorDllName =
|
|
31
32
|
"WallstopStudios.DxMessaging.SourceGenerators.dll";
|
|
32
33
|
|
|
34
|
+
// The analyzer DLL is a SEPARATE assembly, but both compiler-host DLLs are pinned to
|
|
35
|
+
// Unity 2021-compatible Roslyn 3.8.0. They ship side-by-side and both need the
|
|
36
|
+
// RoslynAnalyzer label.
|
|
37
|
+
private static readonly string AnalyzerDllName = "WallstopStudios.DxMessaging.Analyzer.dll";
|
|
38
|
+
|
|
39
|
+
// The analyzer DLLs and shared Roslyn surface ship unconditionally; they're light enough
|
|
40
|
+
// and required for DXMSG002–DXMSG009 to function at all. The list intentionally references
|
|
41
|
+
// a few transitive Roslyn deps that may or may not physically ship with the package; the
|
|
42
|
+
// copy loop below silently skips any name that isn't on disk.
|
|
33
43
|
private static readonly string[] RequiredDllNames =
|
|
34
44
|
{
|
|
35
45
|
SourceGeneratorDllName,
|
|
46
|
+
AnalyzerDllName,
|
|
36
47
|
"Microsoft.CodeAnalysis.dll",
|
|
37
48
|
"Microsoft.CodeAnalysis.CSharp.dll",
|
|
38
49
|
"System.Text.Encodings.Web.dll",
|
|
@@ -44,15 +55,53 @@ namespace DxMessaging.Editor
|
|
|
44
55
|
"System.Threading.Tasks.Extensions.dll",
|
|
45
56
|
"System.Numerics.Vectors.dll",
|
|
46
57
|
"System.Text.Encoding.CodePages.dll",
|
|
47
|
-
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// DLLs that must be tagged with Unity's "RoslynAnalyzer" asset label so Unity's compiler
|
|
61
|
+
// pipeline picks them up as analyzer/source-generator hosts. Other DLLs in the same folder
|
|
62
|
+
// (Roslyn runtime, immutable collections) are plain Editor-only plugin DLLs.
|
|
63
|
+
private static readonly HashSet<string> AnalyzerLabeledDllNames = new(
|
|
64
|
+
StringComparer.OrdinalIgnoreCase
|
|
65
|
+
)
|
|
66
|
+
{
|
|
67
|
+
SourceGeneratorDllName,
|
|
68
|
+
AnalyzerDllName,
|
|
48
69
|
};
|
|
49
70
|
|
|
50
71
|
private static readonly HashSet<string> DllNames = new(StringComparer.OrdinalIgnoreCase);
|
|
51
72
|
|
|
52
73
|
static SetupCscRsp()
|
|
53
74
|
{
|
|
54
|
-
|
|
55
|
-
|
|
75
|
+
ScheduleSetupStep(EnsureDLLsExistInAssets, "copy analyzer DLLs into Assets");
|
|
76
|
+
ScheduleSetupStep(EnsureCscRsp, "clean csc.rsp analyzer entries");
|
|
77
|
+
ScheduleAdditionalFileForIgnoreListSync();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
internal static void ScheduleAdditionalFileForIgnoreListSync()
|
|
81
|
+
{
|
|
82
|
+
ScheduleSetupStep(
|
|
83
|
+
EnsureAdditionalFileForIgnoreList,
|
|
84
|
+
"sync csc.rsp base-call ignore additionalfile entry"
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private static void ScheduleSetupStep(Action work, string description)
|
|
89
|
+
{
|
|
90
|
+
DxMessagingEditorIdle.ScheduleAssetDatabaseMutation(() =>
|
|
91
|
+
RunSetupStep(work, description)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private static void RunSetupStep(Action work, string description)
|
|
96
|
+
{
|
|
97
|
+
try
|
|
98
|
+
{
|
|
99
|
+
work();
|
|
100
|
+
}
|
|
101
|
+
catch (Exception ex)
|
|
102
|
+
{
|
|
103
|
+
DxMessagingEditorLog.LogError($"SetupCscRsp failed to {description}.", ex);
|
|
104
|
+
}
|
|
56
105
|
}
|
|
57
106
|
|
|
58
107
|
private static void EnsureDLLsExistInAssets()
|
|
@@ -107,7 +156,7 @@ namespace DxMessaging.Editor
|
|
|
107
156
|
AssetDatabase.ImportAsset(outputAsset);
|
|
108
157
|
}
|
|
109
158
|
|
|
110
|
-
if (requiredDllName
|
|
159
|
+
if (AnalyzerLabeledDllNames.Contains(requiredDllName))
|
|
111
160
|
{
|
|
112
161
|
Object loadedDll = AssetDatabase.LoadMainAssetAtPath(outputAsset);
|
|
113
162
|
if (loadedDll != null)
|
|
@@ -126,21 +175,28 @@ namespace DxMessaging.Editor
|
|
|
126
175
|
{
|
|
127
176
|
bool importerDirty = false;
|
|
128
177
|
|
|
178
|
+
// A RoslynAnalyzer-labeled DLL must be EXCLUDED from every
|
|
179
|
+
// build platform, including the Editor, so Unity treats it as a
|
|
180
|
+
// C# compiler analyzer rather than a managed precompiled
|
|
181
|
+
// assembly. The same-named DLL is importable from two locations
|
|
182
|
+
// (the package's own Editor/Analyzers copy and this Assets
|
|
183
|
+
// copy); if either is an Editor-enabled precompiled assembly,
|
|
184
|
+
// Unity 2021 aborts with "Multiple precompiled assemblies with
|
|
185
|
+
// the same name". The Roslyn runtime dependencies in the same
|
|
186
|
+
// folder already ship Editor-disabled and never collide -- this
|
|
187
|
+
// converges the analyzer DLLs onto that proven-safe shape.
|
|
188
|
+
// NOTE: SetExcludeFromAnyPlatform is a no-op once
|
|
189
|
+
// CompatibleWithAnyPlatform is false, so the Editor platform is
|
|
190
|
+
// disabled through the effective SetCompatibleWithEditor API.
|
|
129
191
|
if (importer.GetCompatibleWithAnyPlatform())
|
|
130
192
|
{
|
|
131
193
|
importer.SetCompatibleWithAnyPlatform(false);
|
|
132
194
|
importerDirty = true;
|
|
133
195
|
}
|
|
134
196
|
|
|
135
|
-
if (importer.
|
|
136
|
-
{
|
|
137
|
-
importer.SetExcludeFromAnyPlatform("Editor", false);
|
|
138
|
-
importerDirty = true;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (!importer.GetExcludeFromAnyPlatform("Standalone"))
|
|
197
|
+
if (importer.GetCompatibleWithEditor())
|
|
142
198
|
{
|
|
143
|
-
importer.
|
|
199
|
+
importer.SetCompatibleWithEditor(false);
|
|
144
200
|
importerDirty = true;
|
|
145
201
|
}
|
|
146
202
|
|
|
@@ -153,10 +209,11 @@ namespace DxMessaging.Editor
|
|
|
153
209
|
DllNames.Add(requiredDllName);
|
|
154
210
|
break;
|
|
155
211
|
}
|
|
156
|
-
catch (Exception
|
|
212
|
+
catch (Exception ex)
|
|
157
213
|
{
|
|
158
|
-
|
|
159
|
-
$"Failed to copy {requiredDllName} to Assets
|
|
214
|
+
DxMessagingEditorLog.LogError(
|
|
215
|
+
$"Failed to copy {requiredDllName} to Assets.",
|
|
216
|
+
ex
|
|
160
217
|
);
|
|
161
218
|
}
|
|
162
219
|
}
|
|
@@ -190,6 +247,15 @@ namespace DxMessaging.Editor
|
|
|
190
247
|
return !sourceHash.AsSpan().SequenceEqual(destinationHash);
|
|
191
248
|
}
|
|
192
249
|
|
|
250
|
+
/// <summary>
|
|
251
|
+
/// Removes stale DxMessaging analyzer <c>-a:</c> entries from <c>csc.rsp</c>.
|
|
252
|
+
/// </summary>
|
|
253
|
+
/// <remarks>
|
|
254
|
+
/// DxMessaging analyzers are activated solely through the RoslynAnalyzer-labeled
|
|
255
|
+
/// <c>Assets/Plugins/Editor/WallstopStudios.DxMessaging</c> copy. A second
|
|
256
|
+
/// <c>-a:</c> registration here double-loads the analyzer/source-generator, and
|
|
257
|
+
/// registering dependency DLLs as analyzers makes Unity's compiler path fragile.
|
|
258
|
+
/// </remarks>
|
|
193
259
|
private static void EnsureCscRsp()
|
|
194
260
|
{
|
|
195
261
|
try
|
|
@@ -201,66 +267,367 @@ namespace DxMessaging.Editor
|
|
|
201
267
|
}
|
|
202
268
|
|
|
203
269
|
string rspContent = File.ReadAllText(RspFilePath);
|
|
204
|
-
|
|
205
|
-
|
|
270
|
+
|
|
271
|
+
string[] newLines = CleanDxMessagingAnalyzerLines(
|
|
272
|
+
rspContent.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries),
|
|
273
|
+
out bool foundStaleEntries
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
if (foundStaleEntries)
|
|
206
277
|
{
|
|
207
|
-
|
|
278
|
+
// Write the cleaned up content
|
|
279
|
+
string newContent = string.Join(Environment.NewLine, newLines);
|
|
280
|
+
if (!string.IsNullOrEmpty(newContent))
|
|
208
281
|
{
|
|
282
|
+
newContent += Environment.NewLine;
|
|
283
|
+
}
|
|
284
|
+
File.WriteAllText(RspFilePath, newContent);
|
|
285
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
286
|
+
Debug.Log("Updated csc.rsp.");
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch (IOException ex)
|
|
290
|
+
{
|
|
291
|
+
DxMessagingEditorLog.LogError("Failed to modify csc.rsp.", ex);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
internal static string[] CleanDxMessagingAnalyzerLines(
|
|
296
|
+
IEnumerable<string> lines,
|
|
297
|
+
out bool foundStaleEntries
|
|
298
|
+
)
|
|
299
|
+
{
|
|
300
|
+
List<string> newLines = new();
|
|
301
|
+
foundStaleEntries = false;
|
|
302
|
+
|
|
303
|
+
foreach (string line in lines ?? Array.Empty<string>())
|
|
304
|
+
{
|
|
305
|
+
string trimmedLine = line?.Trim();
|
|
306
|
+
if (string.IsNullOrEmpty(trimmedLine))
|
|
307
|
+
{
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (IsResponseFileComment(trimmedLine))
|
|
312
|
+
{
|
|
313
|
+
newLines.Add(trimmedLine);
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
List<string> retainedArguments = new();
|
|
318
|
+
bool removedFromLine = false;
|
|
319
|
+
foreach (string argument in SplitResponseFileArguments(trimmedLine))
|
|
320
|
+
{
|
|
321
|
+
if (IsDxMessagingAnalyzerArgument(argument))
|
|
322
|
+
{
|
|
323
|
+
foundStaleEntries = true;
|
|
324
|
+
removedFromLine = true;
|
|
209
325
|
continue;
|
|
210
326
|
}
|
|
211
327
|
|
|
212
|
-
|
|
213
|
-
|
|
328
|
+
retainedArguments.Add(argument);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (removedFromLine)
|
|
332
|
+
{
|
|
333
|
+
if (retainedArguments.Count > 0)
|
|
334
|
+
{
|
|
335
|
+
newLines.Add(string.Join(" ", retainedArguments));
|
|
336
|
+
}
|
|
337
|
+
continue;
|
|
214
338
|
}
|
|
215
339
|
|
|
340
|
+
newLines.Add(trimmedLine);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return newLines.ToArray();
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
private static bool IsDxMessagingAnalyzerArgument(string trimmedLine)
|
|
347
|
+
{
|
|
348
|
+
return (
|
|
349
|
+
TryGetCompilerOptionValue(trimmedLine, "a", out string _)
|
|
350
|
+
|| TryGetCompilerOptionValue(trimmedLine, "analyzer", out string _)
|
|
351
|
+
)
|
|
352
|
+
&& (
|
|
353
|
+
trimmedLine.Contains(
|
|
354
|
+
"com.wallstop-studios.dxmessaging",
|
|
355
|
+
StringComparison.OrdinalIgnoreCase
|
|
356
|
+
)
|
|
357
|
+
|| trimmedLine.Contains(
|
|
358
|
+
"WallstopStudios.DxMessaging",
|
|
359
|
+
StringComparison.OrdinalIgnoreCase
|
|
360
|
+
)
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/// <summary>
|
|
365
|
+
/// Ensures <c>csc.rsp</c> contains a single <c>-additionalfile:</c> line pointing at the
|
|
366
|
+
/// base-call ignore sidecar, when (and only when) that sidecar physically exists. Stale
|
|
367
|
+
/// entries pointing at moved or deleted sidecar paths are removed.
|
|
368
|
+
/// </summary>
|
|
369
|
+
/// <remarks>
|
|
370
|
+
/// The sidecar is generated by <see cref="DxMessagingBaseCallIgnoreSync"/>. csc happily
|
|
371
|
+
/// runs without it, so this method does NOT auto-create; sidecar writes schedule this sync
|
|
372
|
+
/// again after deferred regeneration completes.
|
|
373
|
+
/// </remarks>
|
|
374
|
+
private static void EnsureAdditionalFileForIgnoreList()
|
|
375
|
+
{
|
|
376
|
+
try
|
|
377
|
+
{
|
|
378
|
+
if (!File.Exists(RspFilePath))
|
|
379
|
+
{
|
|
380
|
+
File.WriteAllText(RspFilePath, string.Empty);
|
|
381
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
string sidecarRelativePath = DxMessagingBaseCallIgnoreSync.SidecarAssetPath;
|
|
385
|
+
string projectRoot = Path.GetFullPath(Path.Combine(Application.dataPath, ".."))
|
|
386
|
+
.Replace("\\", "/");
|
|
387
|
+
string sidecarAbsolutePath = Path.Combine(projectRoot, sidecarRelativePath)
|
|
388
|
+
.Replace("\\", "/");
|
|
389
|
+
|
|
390
|
+
bool sidecarExists = File.Exists(sidecarAbsolutePath);
|
|
391
|
+
string[] newLines = SynchronizeAdditionalFileForIgnoreListLines(
|
|
392
|
+
File.ReadAllLines(RspFilePath),
|
|
393
|
+
sidecarRelativePath,
|
|
394
|
+
sidecarExists,
|
|
395
|
+
out bool modified
|
|
396
|
+
);
|
|
397
|
+
|
|
216
398
|
if (modified)
|
|
217
399
|
{
|
|
400
|
+
string newContent = string.Join(Environment.NewLine, newLines);
|
|
401
|
+
if (!string.IsNullOrEmpty(newContent))
|
|
402
|
+
{
|
|
403
|
+
newContent += Environment.NewLine;
|
|
404
|
+
}
|
|
405
|
+
File.WriteAllText(RspFilePath, newContent);
|
|
218
406
|
AssetDatabase.ImportAsset("csc.rsp");
|
|
219
|
-
Debug.Log("Updated csc.rsp.");
|
|
407
|
+
Debug.Log("Updated csc.rsp additionalfile entries.");
|
|
220
408
|
}
|
|
221
409
|
}
|
|
222
410
|
catch (IOException ex)
|
|
223
411
|
{
|
|
224
|
-
|
|
412
|
+
DxMessagingEditorLog.LogError("Failed to update csc.rsp additionalfile entry.", ex);
|
|
225
413
|
}
|
|
226
414
|
}
|
|
227
415
|
|
|
228
|
-
|
|
416
|
+
internal static string[] SynchronizeAdditionalFileForIgnoreListLines(
|
|
417
|
+
IEnumerable<string> lines,
|
|
418
|
+
string sidecarRelativePath,
|
|
419
|
+
bool sidecarExists,
|
|
420
|
+
out bool modified
|
|
421
|
+
)
|
|
229
422
|
{
|
|
230
|
-
|
|
231
|
-
string
|
|
423
|
+
string desiredLine = FormatAdditionalFileArgument(sidecarRelativePath);
|
|
424
|
+
List<string> newLines = new();
|
|
425
|
+
bool foundDesired = false;
|
|
426
|
+
bool foundStale = false;
|
|
232
427
|
|
|
233
|
-
foreach (string
|
|
428
|
+
foreach (string line in lines ?? Array.Empty<string>())
|
|
234
429
|
{
|
|
235
|
-
|
|
430
|
+
string trimmedLine = line?.Trim();
|
|
431
|
+
if (string.IsNullOrEmpty(trimmedLine))
|
|
236
432
|
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
: Path.GetFullPath(Path.Combine(projectRoot, directory));
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
240
435
|
|
|
241
|
-
|
|
242
|
-
|
|
436
|
+
if (IsResponseFileComment(trimmedLine))
|
|
437
|
+
{
|
|
438
|
+
newLines.Add(trimmedLine);
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
List<string> retainedArguments = new();
|
|
443
|
+
bool removedFromLine = false;
|
|
444
|
+
foreach (string argument in SplitResponseFileArguments(trimmedLine))
|
|
445
|
+
{
|
|
446
|
+
if (!IsDxMessagingBaseCallIgnoreAdditionalFile(argument))
|
|
243
447
|
{
|
|
448
|
+
retainedArguments.Add(argument);
|
|
244
449
|
continue;
|
|
245
450
|
}
|
|
246
451
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (
|
|
452
|
+
bool isDesired =
|
|
453
|
+
sidecarExists
|
|
454
|
+
&& IsAdditionalFileArgumentForPath(argument, sidecarRelativePath);
|
|
455
|
+
if (!isDesired)
|
|
251
456
|
{
|
|
457
|
+
// Stale entry pointing at a moved/renamed/deleted sidecar; drop it.
|
|
458
|
+
foundStale = true;
|
|
459
|
+
removedFromLine = true;
|
|
252
460
|
continue;
|
|
253
461
|
}
|
|
254
462
|
|
|
255
|
-
|
|
256
|
-
if (!yielded.Add(normalizedRelativePath))
|
|
463
|
+
if (foundDesired)
|
|
257
464
|
{
|
|
465
|
+
// Drop duplicate.
|
|
466
|
+
foundStale = true;
|
|
467
|
+
removedFromLine = true;
|
|
258
468
|
continue;
|
|
259
469
|
}
|
|
260
470
|
|
|
261
|
-
|
|
471
|
+
retainedArguments.Add(desiredLine);
|
|
472
|
+
foundDesired = true;
|
|
473
|
+
if (!string.Equals(argument, desiredLine, StringComparison.Ordinal))
|
|
474
|
+
{
|
|
475
|
+
foundStale = true;
|
|
476
|
+
removedFromLine = true;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (retainedArguments.Count > 0)
|
|
481
|
+
{
|
|
482
|
+
newLines.Add(string.Join(" ", retainedArguments));
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (!removedFromLine)
|
|
487
|
+
{
|
|
488
|
+
newLines.Add(trimmedLine);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
bool needsAppend = sidecarExists && !foundDesired;
|
|
493
|
+
if (needsAppend)
|
|
494
|
+
{
|
|
495
|
+
newLines.Add(desiredLine);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
modified = foundStale || needsAppend;
|
|
499
|
+
return newLines.ToArray();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
private static string FormatAdditionalFileArgument(string sidecarRelativePath)
|
|
503
|
+
{
|
|
504
|
+
return $"-additionalfile:\"{sidecarRelativePath}\"";
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
private static bool IsResponseFileComment(string trimmedLine)
|
|
508
|
+
{
|
|
509
|
+
return trimmedLine.StartsWith("#", StringComparison.Ordinal);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
private static bool IsDxMessagingBaseCallIgnoreAdditionalFile(string trimmedLine)
|
|
513
|
+
{
|
|
514
|
+
return TryGetCompilerOptionValue(trimmedLine, "additionalfile", out string value)
|
|
515
|
+
&& value.Contains("DxMessaging.", StringComparison.OrdinalIgnoreCase)
|
|
516
|
+
&& value.Contains("BaseCallIgnore", StringComparison.OrdinalIgnoreCase);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
private static bool IsAdditionalFileArgumentForPath(
|
|
520
|
+
string argument,
|
|
521
|
+
string sidecarRelativePath
|
|
522
|
+
)
|
|
523
|
+
{
|
|
524
|
+
if (!TryGetCompilerOptionValue(argument, "additionalfile", out string value))
|
|
525
|
+
{
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
string unquotedValue = UnquoteWholeArgument(value.Trim());
|
|
530
|
+
return string.Equals(
|
|
531
|
+
unquotedValue.Replace("\\", "/"),
|
|
532
|
+
sidecarRelativePath,
|
|
533
|
+
StringComparison.OrdinalIgnoreCase
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
private static bool TryGetCompilerOptionValue(
|
|
538
|
+
string argument,
|
|
539
|
+
string optionName,
|
|
540
|
+
out string value
|
|
541
|
+
)
|
|
542
|
+
{
|
|
543
|
+
value = string.Empty;
|
|
544
|
+
if (string.IsNullOrEmpty(argument) || string.IsNullOrEmpty(optionName))
|
|
545
|
+
{
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
string unquotedArgument = UnquoteWholeArgument(argument.Trim());
|
|
550
|
+
if (unquotedArgument.Length <= optionName.Length + 1)
|
|
551
|
+
{
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
if (unquotedArgument[0] != '-' && unquotedArgument[0] != '/')
|
|
556
|
+
{
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if (unquotedArgument[optionName.Length + 1] != ':')
|
|
561
|
+
{
|
|
562
|
+
return false;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
if (
|
|
566
|
+
string.Compare(
|
|
567
|
+
unquotedArgument,
|
|
568
|
+
1,
|
|
569
|
+
optionName,
|
|
570
|
+
0,
|
|
571
|
+
optionName.Length,
|
|
572
|
+
StringComparison.OrdinalIgnoreCase
|
|
573
|
+
) != 0
|
|
574
|
+
)
|
|
575
|
+
{
|
|
576
|
+
return false;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
value = unquotedArgument.Substring(optionName.Length + 2);
|
|
580
|
+
return true;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
private static string UnquoteWholeArgument(string argument)
|
|
584
|
+
{
|
|
585
|
+
if (argument.Length >= 2 && argument[0] == '"' && argument[argument.Length - 1] == '"')
|
|
586
|
+
{
|
|
587
|
+
return argument.Substring(1, argument.Length - 2).Replace("\"\"", "\"");
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
return argument;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
private static List<string> SplitResponseFileArguments(string line)
|
|
594
|
+
{
|
|
595
|
+
List<string> arguments = new();
|
|
596
|
+
if (string.IsNullOrWhiteSpace(line))
|
|
597
|
+
{
|
|
598
|
+
return arguments;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
System.Text.StringBuilder current = new();
|
|
602
|
+
bool inQuotes = false;
|
|
603
|
+
foreach (char character in line)
|
|
604
|
+
{
|
|
605
|
+
if (character == '"')
|
|
606
|
+
{
|
|
607
|
+
inQuotes = !inQuotes;
|
|
608
|
+
current.Append(character);
|
|
609
|
+
continue;
|
|
262
610
|
}
|
|
611
|
+
|
|
612
|
+
if (char.IsWhiteSpace(character) && !inQuotes)
|
|
613
|
+
{
|
|
614
|
+
if (current.Length > 0)
|
|
615
|
+
{
|
|
616
|
+
arguments.Add(current.ToString());
|
|
617
|
+
current.Clear();
|
|
618
|
+
}
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
current.Append(character);
|
|
263
623
|
}
|
|
624
|
+
|
|
625
|
+
if (current.Length > 0)
|
|
626
|
+
{
|
|
627
|
+
arguments.Add(current.ToString());
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
return arguments;
|
|
264
631
|
}
|
|
265
632
|
}
|
|
266
633
|
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 54bd01ff5fd34bbc9950a1c7230a15d8
|
|
3
|
-
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 54bd01ff5fd34bbc9950a1c7230a15d8
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -7,7 +7,7 @@ namespace DxMessaging.Editor.Testing
|
|
|
7
7
|
using Core;
|
|
8
8
|
using Core.Diagnostics;
|
|
9
9
|
using Core.MessageBus;
|
|
10
|
-
using Unity;
|
|
10
|
+
using DxMessaging.Unity;
|
|
11
11
|
using UnityEngine;
|
|
12
12
|
|
|
13
13
|
/// <summary>
|
|
@@ -39,7 +39,7 @@ namespace DxMessaging.Editor.Testing
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
List<ListenerDiagnosticsView> listenerViews = component
|
|
42
|
-
._registeredListeners.OrderBy(pair => pair.Key
|
|
42
|
+
._registeredListeners.OrderBy(pair => InstanceId.StableId(pair.Key))
|
|
43
43
|
.Select(pair => CreateListenerView(pair.Key, pair.Value))
|
|
44
44
|
.ToList();
|
|
45
45
|
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2624c9e8eb5243ebb71545774f411c2c
|
|
3
|
-
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2624c9e8eb5243ebb71545774f411c2c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Editor/Testing.meta
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a61780c8ba084b29bb44fdefc9b7fcf2
|
|
3
|
-
timeCreated: 1761880591
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a61780c8ba084b29bb44fdefc9b7fcf2
|
|
3
|
+
timeCreated: 1761880591
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "WallstopStudios.DxMessaging.Editor",
|
|
3
|
-
"rootNamespace": "DxMessaging.Editor",
|
|
4
|
-
"references": ["WallstopStudios.DxMessaging"],
|
|
5
|
-
"includePlatforms": ["Editor"],
|
|
6
|
-
"excludePlatforms": [],
|
|
7
|
-
"allowUnsafeCode": false,
|
|
8
|
-
"overrideReferences": false,
|
|
9
|
-
"precompiledReferences": [],
|
|
10
|
-
"autoReferenced": true,
|
|
11
|
-
"defineConstraints": [],
|
|
12
|
-
"versionDefines": [],
|
|
13
|
-
"noEngineReferences": false
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "WallstopStudios.DxMessaging.Editor",
|
|
3
|
+
"rootNamespace": "DxMessaging.Editor",
|
|
4
|
+
"references": ["WallstopStudios.DxMessaging"],
|
|
5
|
+
"includePlatforms": ["Editor"],
|
|
6
|
+
"excludePlatforms": [],
|
|
7
|
+
"allowUnsafeCode": false,
|
|
8
|
+
"overrideReferences": false,
|
|
9
|
+
"precompiledReferences": [],
|
|
10
|
+
"autoReferenced": true,
|
|
11
|
+
"defineConstraints": [],
|
|
12
|
+
"versionDefines": [],
|
|
13
|
+
"noEngineReferences": false
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 4be90ea11db262f43913b0e065a25c7f
|
|
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/Editor.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 41dce8be641afe34ca8363865b8cd5d9
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 41dce8be641afe34ca8363865b8cd5d9
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|