Initialize all loaded assemblies on Main(), not just the game one.

This commit is contained in:
LazyDuchess 2022-11-16 21:08:40 -03:00
parent e5553748a8
commit 122334b4ec
2 changed files with 11 additions and 1 deletions

View file

@ -11,6 +11,16 @@ namespace OpenTS2.Assemblies
public static class AssemblyHelper
{
public static Action<Type, Assembly> AssemblyProcesses;
public static void InitializeLoadedAssemblies()
{
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach(var element in assemblies)
{
InitializeAssembly(element);
}
}
/// <summary>
/// Initializes an assembly, does Reflection tasks like parsing attributes.
/// </summary>

View file

@ -30,7 +30,7 @@ namespace OpenTS2.Engine.Core
Factories.TextureFactory = new TextureFactory();
CodecAttribute.Initialize();
//Initialize the game assembly, do all reflection things.
AssemblyHelper.InitializeAssembly(Assembly.GetExecutingAssembly());
AssemblyHelper.InitializeLoadedAssemblies();
s_initialized = true;
}
}