mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-23 00:31:47 -05:00
Initialize all loaded assemblies on Main(), not just the game one.
This commit is contained in:
parent
e5553748a8
commit
122334b4ec
2 changed files with 11 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue