Skip to content

Commit

Permalink
Fix missing entry handler for UnityEngine.dll on newer versions
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
Quit committed Dec 8, 2018
1 parent 9a5d2f7 commit ca30be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPA/PatchContext.cs
Expand Up @@ -49,7 +49,7 @@ public static PatchContext Create(String[] args)
context.ProjectName = Path.GetFileNameWithoutExtension(context.Executable);
context.DataPathDst = Path.Combine(context.ProjectRoot, context.ProjectName + "_Data");
context.ManagedPath = Path.Combine(context.DataPathDst, "Managed");
context.EngineFile = DetermineEngineFile(context.ManagedPath, "UnityEngine.dll", "UnityEngine.CoreModule.dll");
context.EngineFile = DetermineEngineFile(context.ManagedPath, "UnityEngine.CoreModule.dll", "UnityEngine.dll");
context.AssemblyFile = Path.Combine(context.ManagedPath, "Assembly-Csharp.dll");
context.BackupPath = Path.Combine(Path.Combine(context.IPARoot, "Backups"), context.ProjectName);
context.ShortcutPath = Path.Combine(context.ProjectRoot, $"{context.ProjectName} (Patch & Launch)") + ".lnk";
Expand Down

2 comments on commit ca30be3

@jb1361
Copy link

@jb1361 jb1361 commented on ca30be3 Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something here or does the order of the dll's matter?

@Quit
Copy link
Contributor Author

@Quit Quit commented on ca30be3 Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order matters because the function returns the first DLL it can find. On newer unity versions, UnityEngine.dll does not contain the necessary types anymore; yet it exists.

Please sign in to comment.