Commit b624d05
committed
fix(core): inject HybridCLR hot-update dir into Obfuz player-build
When Assembly-CSharp has a compile-time reference to HotUpdate.Code
(e.g. because a user re-enables autoReferenced on the hot-update asmdef
or their own code uses a HotUpdate.Code type), Unity's player build
fails during Obfuz's ObfuscationProcess.OnPostBuildPlayerScriptDLLs
with:
FileNotFoundException: Assembly HotUpdate.Code not found
at Obfuz.Utils.AssemblyCache.LoadModule (System.String moduleName)
Root cause: HybridCLR's FilterHotFixAssemblies correctly strips
HotUpdate.Code from the player staging area so it never ships baked in.
But Obfuz then obfuscates Assembly-CSharp and recursively resolves
every GetAssemblyRefs() entry via a flat PathAssemblyResolver. The
resolver only searches the player staging dir plus
ObfuzSettings.additionalAssemblySearchPaths, and HotUpdate.Code lives
in HybridCLRData/HotUpdateDlls/<target>/ - not in either.
Add ObfuzHotUpdateSearchPathInjector, an IPreprocessBuildWithReport /
IPostprocessBuildWithReport that snapshots
ObfuzSettings.additionalAssemblySearchPaths at the start of each
player build, appends HybridCLRData/HotUpdateDlls/<target>/ when
present, and restores the original list afterwards. In-memory only -
Obfuz.asset on disk is never modified.
The asmdef fix in the previous commit removes the trigger for the
template; this processor is the defensive safety net for users who
deviate from the template.
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>1 parent 1c49ad6 commit b624d05
3 files changed
Lines changed: 149 additions & 0 deletions
File tree
- UnityProject/Packages
- com.jasonxudeveloper.jengine.core/Editor/CustomEditor
- com.jasonxudeveloper.jengine.ui/Tests/Editor/Utilities
Lines changed: 127 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments