Changes

Jump to navigation Jump to search
Line 58: Line 58:     
You can also add this code snippet to your ModMeta class, to load dll files from a subfolder: (Note that this requires GiveMeFreedom and it might not find the correct dll filename, so you might need to adjust it to your situation)
 
You can also add this code snippet to your ModMeta class, to load dll files from a subfolder: (Note that this requires GiveMeFreedom and it might not find the correct dll filename, so you might need to adjust it to your situation)
public override void Initialize(ModController.DLLMod parentMod)
+
<pre class="language-cs">public override void Initialize(ModController.DLLMod parentMod)
    {
+
    {
    AppDomain.CurrentDomain.AssemblyResolve += (x, y) => Assembly.LoadFrom(Path.Combine(parentMod.FolderPath(), "'''SubFolder'''/" + y.Name.Substring(0, y.Name.IndexOf(",")) + ".dll"));
+
    AppDomain.CurrentDomain.AssemblyResolve += (x, y) => Assembly.LoadFrom(Path.Combine(parentMod.FolderPath(), "'''SubFolder'''/" + y.Name.Substring(0, y.Name.IndexOf(",")) + ".dll"));
    base.Initialize(parentMod);
+
    base.Initialize(parentMod);
    }
+
    }</pre>
    
== Compatibility ==
 
== Compatibility ==

Navigation menu