I am making a game using Visual Studio 2022 and C# and I was wondering if it was possible to trigger some code when you hot reload your app (whilst it's running).
I basically have 2 methods called UnloadLevel and LoadLevel that I would like to execute on Hot Reload.
I am building a game and to make levels I have the LoadLevel method that puts all the elements (the platforms, entities etc) from this LevelData static class into the game scene. The UnloadLevel function does the opposite. In order to build the levels fast without making an entire fledged out LevelEditor which would be long and tidious to make, I thought using the Hot Reload function of visual studio 2022 to change the LevelData, hot reload, and automatically see the changes in my level scene without having to unload and reload manually.
Thanks in Advance