-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlink.xml
More file actions
46 lines (40 loc) · 2.91 KB
/
Copy pathlink.xml
File metadata and controls
46 lines (40 loc) · 2.91 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!-- Ships inside the com.neoxider.coreaiunity package so consumer projects need NO link.xml of
their own for CoreAI: Unity's linker picks up link.xml files from packages automatically.
Consumers still must set Managed Stripping Level = Medium (not High) and IL2CPP Code
Generation = OptimizeSize for WebGL - player settings cannot ship in a package. See
CoreAI Docs/LUA_ACCESS_MODES.md, "WebGL / IL2CPP Stripping Requirements". -->
<linker>
<!-- WebGL/IL2CPP: keep the Lua-CSharp VM + its source-generated marshalling metadata. The managed
VM is AOT-safe, but its binding trampolines and LuaValue marshalling are reached generically,
so preserve both the runtime and the annotations assembly to keep them off the stripper. -->
<assembly fullname="Lua" preserve="all"/>
<assembly fullname="Lua.Annotations" preserve="all"/>
<!-- WebGL/IL2CPP: CoreAI loads its built-in agent prompts, skills, and bundled Lua mods through
UnityEngine.Resources.Load<TextAsset>(...) (AgentPrompts/System, AgentSkills/LuaModding,
CoreAIMods/*.lua). Preserve these two engine types so Medium+ managed stripping cannot drop
the members those loads reach and leave a WebGL player with missing content. -->
<assembly fullname="UnityEngine.CoreModule">
<type fullname="UnityEngine.Resources" preserve="all"/>
<type fullname="UnityEngine.TextAsset" preserve="all"/>
</assembly>
<!-- Microsoft.Extensions.AI core -->
<assembly fullname="Microsoft.Extensions.AI" preserve="all"/>
<assembly fullname="Microsoft.Extensions.AI.Abstractions" preserve="all"/>
<!-- Dependencies MEAI resolves via reflection -->
<assembly fullname="Microsoft.Extensions.DependencyInjection.Abstractions" preserve="all"/>
<assembly fullname="Microsoft.Extensions.Logging.Abstractions" preserve="all"/>
<assembly fullname="System.Text.Json" preserve="all"/>
<assembly fullname="System.Threading.Channels" preserve="all"/>
<!-- MEAI reflection over CoreAI tool types (e.g. MemoryTool) -->
<assembly fullname="CoreAI.Core" preserve="all"/>
<!-- WebGL/IL2CPP with Managed Stripping >= Medium: VContainer creates every DI type via
reflection (TypeAnalyzer) and nothing references those constructors/lambdas directly, so the
stripper removes them one by one ("Type does not found injectable constructor" at container
build). Preserving the whole Unity integration assembly closes the entire class of failures;
it is a thin layer, the size cost is small next to the engine modules. -->
<assembly fullname="CoreAI.Source" preserve="all"/>
<!-- Lua-CSharp reflection-invokes the game binding callbacks registered on LuaCsApiRegistry; keep
the mod assembly so those delegates/closures survive Medium+ stripping on AOT players. -->
<assembly fullname="CoreAI.Mods" preserve="all"/>
</linker>