Trains.NET
Trains.NET copied to clipboard
Support Hot Reload in .NET 6
Add a MetadataUpdateHandler attribute, grab all IReloadable instances from DI, and call the Reload method.
Things that need to be IReloadable:
- Screen caches
- Image caches
- Track renderers that cache paths
See https://github.com/dotnet/runtime/pull/51466 for how to do it.
I did it and its easy enough, but the SDK isn't out yet so haven't checked anything in.