LokiCat.Godot.R3.ObservableSignals 1.0.25

There is a newer version of this package available.
See the version list below for details.
dotnet add package LokiCat.Godot.R3.ObservableSignals --version 1.0.25
                    
NuGet\Install-Package LokiCat.Godot.R3.ObservableSignals -Version 1.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LokiCat.Godot.R3.ObservableSignals" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LokiCat.Godot.R3.ObservableSignals" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="LokiCat.Godot.R3.ObservableSignals" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LokiCat.Godot.R3.ObservableSignals --version 1.0.25
                    
#r "nuget: LokiCat.Godot.R3.ObservableSignals, 1.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LokiCat.Godot.R3.ObservableSignals@1.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LokiCat.Godot.R3.ObservableSignals&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=LokiCat.Godot.R3.ObservableSignals&version=1.0.25
                    
Install as a Cake Tool

LokiCat.Godot.R3.ObservableSignals

R3-compatible source generator for turning [RxSignal]-annotated observables and [Signal]-annotated delegates in Godot C# into fully reactive Godot signals and cached Observable<T> properties.

This package eliminates boilerplate when exposing Godot signals through R3 observables.
It provides two distinct but complementary features:

  • [RxSignal] — Turn your private observable fields into real Godot signals and clean public properties.
  • [Signal] — Automatically wrap built-in and custom Godot signals into Observables.

📢 Important:

  • [RxSignal]: _onJumpOnJump observable ➔ emits Jump Godot signal.
  • [Signal]: JumpEventHandler delegate ➔ Jump Godot signal ➔ exposes OnJump observable.
Attribute Field Godot Signal Observable
[RxSignal] _onJump Jump OnJump
[Signal] JumpEventHandler Jump OnJump

🚀 Quick Start

To expose a custom signal:

[RxSignal]
private Subject<Unit> _onJump = new();

// Access OnJump and subscribe
OnJump.Subscribe(_ => GD.Print("Jumped!"));

// Fire the signal manually
_onJump.OnNext(Unit.Default);

✅ The Godot editor shows a Jump signal, auto-wired.

To wrap a built-in or manual signal:

[Signal]
public delegate void JumpEventHandler();

// Automatically exposes OnJump observable
OnJump.Subscribe(_ => GD.Print("Built-in Jumped!"));

✅ The Jump Godot signal emits and is observed reactively.


✨ Features

  • [RxSignal]

    • Detects [RxSignal]-annotated observable fields.
    • Generates matching [Signal] Godot delegates (like JumpEventHandler).
    • Exposes a lazily connected public Observable<T> property (OnJump).
  • [Signal]

    • Detects [Signal]-annotated delegates.
    • Wraps Godot signals as reactive Observable<T> properties (OnJump).
  • Full R3 compatibility.

  • Full Godot Editor and visual signal connection support.

  • Fast incremental source generation.


📦 Installation

dotnet add package LokiCat.Godot.R3.ObservableSignals

✅ Supported Signal Forms

Observable Type Generated Signal and Emission
Observable<Unit> EmitSignal("SignalName")
Observable<T> EmitSignal("SignalName", T)
Observable<(T1, T2)> EmitSignal("SignalName", T1, T2)
... up to 5 arguments EmitSignal("SignalName", T1, T2, ..., T5)

Signals with more than 5 parameters are not supported and will trigger a generator warning.


⚡ Best Practices

  • Use [RxSignal] for custom gameplay-driven events you control.
  • Use [Signal] for observing existing Godot signals.
  • Always prefix [RxSignal] fields with _on.
  • Compose filtered observables manually (.Where, .Throttle, etc.).

🚨 Warnings

  • [RxSignal] fields must be Observable<T> — otherwise, warning RXSG0002.
  • [Signal] delegates over 5 parameters trigger warning SIGOBS001.
  • Signal names are sanitized to valid C# identifiers.

📜 License

MIT License.


💡 Bonus Tip

Pair this generator with Chickensoft, R3, Godot, and other LokiCat Godot/.NET packages to build fully reactive, signal-driven gameplay systems that are easy to extend, test, and maintain.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.70 236 7/2/2025
1.0.69 118 6/21/2025
1.0.68 105 6/21/2025
1.0.65 141 6/19/2025
1.0.64 140 6/19/2025
1.0.63 139 6/19/2025
1.0.62 137 6/19/2025
1.0.61 140 6/19/2025
1.0.60 141 6/19/2025
1.0.59 139 6/19/2025
1.0.58 142 6/19/2025
1.0.57 139 6/19/2025
1.0.56 144 6/19/2025
1.0.55 139 6/19/2025
1.0.54 139 6/18/2025
1.0.53 140 6/18/2025
1.0.52 137 6/18/2025
1.0.51 145 6/18/2025
1.0.47 153 6/14/2025
1.0.40 154 6/14/2025
1.0.38 163 6/14/2025
1.0.37 138 5/9/2025
1.0.36 81 5/9/2025
1.0.35 81 5/9/2025
1.0.34 82 5/9/2025
1.0.33 146 5/8/2025
1.0.32 146 5/8/2025
1.0.31 146 5/1/2025
1.0.30 152 5/1/2025
1.0.29 151 5/1/2025
1.0.28 150 4/30/2025
1.0.26 147 4/30/2025
1.0.25 146 4/30/2025
1.0.24 144 4/30/2025
1.0.23 152 4/30/2025
1.0.22 150 4/30/2025
1.0.21 142 4/30/2025
1.0.20 146 4/30/2025
1.0.19 142 4/29/2025
1.0.18 159 4/29/2025
1.0.17 156 4/28/2025
1.0.16 159 4/27/2025
1.0.15 166 4/27/2025
1.0.14 159 4/27/2025
1.0.13 157 4/27/2025
1.0.12 155 4/27/2025
1.0.11 152 4/27/2025
1.0.9 160 4/27/2025
1.0.7 161 4/27/2025
1.0.1 152 4/27/2025
1.0.0 159 4/27/2025
0.0.6 247 4/19/2025
0.0.5 169 4/19/2025