Commit c2b52bb
committed
fix(core): disable autoReferenced on HotUpdate.Code asmdef
Hot-update assemblies are loaded at runtime by Bootstrap; they should
not be compile-referenced by Unity's predefined assemblies
(Assembly-CSharp, Assembly-CSharp-firstpass). With autoReferenced=true,
any Assembly-CSharp source that uses a HotUpdate.Code.* type embeds a
real assembly reference into Assembly-CSharp's metadata.
During the Unity player build, HybridCLR's FilterHotFixAssemblies
(IFilterBuildAssemblies) correctly strips HotUpdate.Code from the
player staging area. Obfuz's ObfuscationProcess
(IPostBuildPlayerScriptDLLs) then tries to obfuscate Assembly-CSharp
and recursively resolves its assembly refs via AssemblyCache.LoadModule
(Obfuz Editor/Utils/AssemblyCache.cs:75-97). The HotUpdate.Code ref
can't be resolved from the player search paths, so obfuscation throws
FileNotFoundException: Assembly HotUpdate.Code not found.
Setting autoReferenced=false removes the trigger for template users:
Assembly-CSharp no longer auto-references HotUpdate.Code, so nothing
forces the metadata ref, and Obfuz's recursive resolver never asks for
HotUpdate.Code. Verified safe for the current template: PromptInitializer
references only JEngine.Core / JEngine.UI, and AOTGenericReferences.cs
emits HotUpdate.Code.* entries as comments only
(GenericReferenceWriter.cs:72-127).
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>1 parent ea90126 commit c2b52bb
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments