Hey everyone!
I just released **Hot Reload Live** — a runtime C# hot reload asset for Godot 4.7+ (.NET 8).
Save a `.cs` file, and your running game updates immediately. No editor restart, no domain reload, zero stuttering.
## What you can change at runtime
- Static methods (void / return / ref / out / overloads)
- **Instance methods** — full cross-ALC forwarding via DynamicMethod IL emit
- **Generic methods** — all reference types + 8 common value types (int, float, double, bool, long, byte, char, decimal)
- **async/await** and **IEnumerable iterators** — MoveNext state machine patched safely
- Field layout guard — skips patch with a warning if you add/remove fields
- Restore All — one-click unpatch back to original binaries
## How it works
1. `FileSystemWatcher` detects `.cs` changes → 500ms debounce
2. `dotnet build` to an isolated `.hotswap/vN/` directory (avoids `.godot/` file locks)
3. `AssemblyLoadContext.LoadFromStream()` — collectible, no file locks
4. `ComputeFieldHash()` guard — skips if field layout changed
5. Diff methods by `DispatchKey` (full name + param types)
6. Patch via Harmony — instance methods use a DynamicMethod IL stub that pushes the old object ref directly as the new type’s `this`, bypassing the cross-ALC type identity wall
## Get it
- **itch.io**: https://gutian2000.itch.io/hot-reload-live (name your own price)
- **GitHub**: GitHub - gutian2000/hot-reload-live-godot: Runtime C# hot reload for Godot 4.7+ — save a .cs, watch it run · GitHub
Also available for **Unity** ($49.99 on Unity Asset Store).
Feedback and bug reports welcome — especially edge cases with your project’s codebase!