feat: add Godot C# compatibility and shared codegen weaving
Validate ShrinkSDK Workspace / unity (push) Failing after 3m18s

This commit is contained in:
2026-09-05 02:37:43 +08:00
parent 60cf457230
commit 88ba3cdc48
95 changed files with 2712 additions and 19 deletions
+27
View File
@@ -0,0 +1,27 @@
using ShrinkCommand;
using ShrinkEventBus;
using ShrinkModFramework;
[ShrinkMod("fixture.mod", "Fixture Mod", "1.0.0")]
public sealed class FixtureMod : ShrinkModBase, IShrinkModUnload
{
public bool Ready { get; private set; }
public int UnloadCalls { get; private set; }
public override void OnReady(ShrinkModContext context) => Ready = true;
public void OnUnload(ShrinkModContext context) => UnloadCalls++;
}
public readonly struct ModFixtureEvent : IShrinkEvent { }
[ShrinkEventSubscriber]
public static class ModFixtureEvents
{
public static int Calls { get; private set; }
[ShrinkSubscribe] private static void Handle(ModFixtureEvent value) => Calls++;
}
[ShrinkCommandSubscriber]
public static class ModFixtureCommands
{
[ShrinkCommand("mod-fixture/ping")] public static void Ping() { }
}
+15
View File
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>ShrinkSDK.ModFixture</AssemblyName>
<ShrinkCodeGenEnabled>true</ShrinkCodeGenEnabled>
<_ShrinkCodeGenTaskAssembly>$(MSBuildThisFileDirectory)..\..\CodeGen\ShrinkSDK.CodeGen.Task\bin\$(Configuration)\net8.0\ShrinkSDK.CodeGen.Task.dll</_ShrinkCodeGenTaskAssembly>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Packages\ShrinkSDK.Runtime.Abstractions\ShrinkSDK.Runtime.Abstractions.csproj" />
<ProjectReference Include="..\..\Packages\ShrinkSDK.ModFramework\ShrinkSDK.ModFramework.csproj" />
<ProjectReference Include="..\..\Packages\ShrinkSDK.EventBus\ShrinkSDK.EventBus.csproj" />
<ProjectReference Include="..\..\Packages\ShrinkSDK.Command\ShrinkSDK.Command.csproj" />
</ItemGroup>
<Import Project="..\..\CodeGen\ShrinkSDK.CodeGen.Task\buildTransitive\ShrinkSDK.CodeGen.targets" />
</Project>