Skip to content

Instantly share code, notes, and snippets.

@Speedberg
Speedberg / HotReloadManager.cs
Created December 4, 2022 15:23
An event manager that listens for when changes are made during Hot Reload
using System;
using System.Reflection.Metadata;
[assembly: MetadataUpdateHandler(typeof(HotReloadManager))]
/// <summary>
/// Fires events when a change is made during Hot Reload
/// </summary>
/// <remarks>
/// For more info, read https://learn.microsoft.com/en-us/dotnet/api/system.reflection.metadata.metadataupdatehandlerattribute?view=net-7.0