|
@ -247,8 +247,11 @@ namespace IPA.Injector |
|
|
|
|
|
|
|
|
if (modified) |
|
|
if (modified) |
|
|
{ |
|
|
{ |
|
|
|
|
|
string tempFilePath = Path.GetTempFileName(); |
|
|
bkp?.Add(unityPath); |
|
|
bkp?.Add(unityPath); |
|
|
unityAsmDef.Write(unityPath); |
|
|
|
|
|
|
|
|
unityAsmDef.Write(tempFilePath); |
|
|
|
|
|
File.Delete(unityPath); |
|
|
|
|
|
File.Move(tempFilePath, unityPath); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
endPatchCoreModule: |
|
|
endPatchCoreModule: |
|
@ -279,7 +282,10 @@ namespace IPA.Injector |
|
|
var deleter = ascModDef.GetType("IPAPluginsDirDeleter"); |
|
|
var deleter = ascModDef.GetType("IPAPluginsDirDeleter"); |
|
|
deleter.Methods.Clear(); // delete all methods
|
|
|
deleter.Methods.Clear(); // delete all methods
|
|
|
|
|
|
|
|
|
ascAsmDef.Write(ascPath); |
|
|
|
|
|
|
|
|
string tempFilePath = Path.GetTempFileName(); |
|
|
|
|
|
ascAsmDef.Write(tempFilePath); |
|
|
|
|
|
File.Delete(ascPath); |
|
|
|
|
|
File.Move(tempFilePath, ascPath); |
|
|
|
|
|
|
|
|
isFirst = false; |
|
|
isFirst = false; |
|
|
} |
|
|
} |
|
@ -333,4 +339,4 @@ namespace IPA.Injector |
|
|
_ = PluginComponent.Create(); |
|
|
_ = PluginComponent.Create(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |