Refactored code to use IFileProvider instead of raw System.IO (i.e. File.ReadAllText).
The IFileProvider is used in ASP.NET Core to load static files from the wwwroot but can be used more generically as well.
Specifically the app will not set the ContentRoot (used by the PhysicalFileProvider) to data next to the apps executable OR (in development) next to the Game.csproj (checks if any csproj is in a specific parent dir). This will significantly improve developer experience as we no longer need to worry whether the bin folder can be deleted (clean).
Main changes
Implemented IFileProvider in all services that load files from data
All files from now must be loaded with the IFileProvider without the data/ prefix as this is now implied (maybe configurable in the future)
Breaking changes
You will need to put your data folder from the bin/Debug/net8.0/ folder directly next to your Game.csproj (this folder is ignored)
Additional changes
Introduced the ILoadable interface to streamline how services are loaded initially when starting the game server
Merged proto loaders and their respective manager to minimize maintenance overhead
Removed Configuration from data/ directory. If these files have been used until now => You will need to put these settings in the appsettings.json
Refactored code to use
IFileProvider
instead of rawSystem.IO
(i.e.File.ReadAllText
).The
IFileProvider
is used in ASP.NET Core to load static files from thewwwroot
but can be used more generically as well.Specifically the app will not set the
ContentRoot
(used by thePhysicalFileProvider
) todata
next to the apps executable OR (in development) next to theGame.csproj
(checks if any csproj is in a specific parent dir). This will significantly improve developer experience as we no longer need to worry whether thebin
folder can be deleted (clean).Main changes
IFileProvider
in all services that load files fromdata
IFileProvider
without thedata/
prefix as this is now implied (maybe configurable in the future)Breaking changes
bin/Debug/net8.0/
folder directly next to yourGame.csproj
(this folder is ignored)Additional changes
ILoadable
interface to streamline how services are loaded initially when starting the game serverConfiguration
fromdata/
directory. If these files have been used until now => You will need to put these settings in theappsettings.json
AnimationManager