0

I want to insert some code stub to Assembly-CSharp.dll by using Mono.Cecil before send to il2cpp when build iOS player with batchmode.

Currently, the only way I know is to wrap Unity\Editor\Data\Tools\UnusedByteCodeStripper2\UnusedBytecodeStripper2.exe to execute my patcher before real stripper.

Is there any other better way like [DidReloadScripts] to do this?

For Android, I can patch dlls after BuildPlayer. But for iOS with il2cpp, there is no dll generated before BuildPlayer.

Xiaobin
  • 163
  • 1
  • 1
  • 10
  • here's the solution i mentioned, using [HotPatchEnabler](https://github.com/xiaobin83/Unity3D.HotPatchEnabler) with [UnusedBytecodeStripper2.Chain](https://github.com/xiaobin83/Unity3D.UnusedBytecodeStripper2.Chain) UnusedBytecodeStripper2.Chain find all class with IProcessDLL and execute them before executing original UnusedBytecodeStripper2 – Xiaobin Feb 03 '17 at 03:20

1 Answers1

0

Finally i wrote my own UnusedBytecodeStripper2 to replace the original one, and make the original one as part of process chain.

Check this

Xiaobin
  • 163
  • 1
  • 1
  • 10