InteropMetadata
InteropMetadata registers Alias / MarshalAs / Extension XML for assemblies loaded later in Il2Cpp Player. The Host API specification owns the behavior contract.
Calls
ZLua.InteropMetadata.RegisterAliasXml(paths, projectRoot);
ZLua.InteropMetadata.RegisterMarshalAsXml(paths, projectRoot);
ZLua.InteropMetadata.RegisterExtensionXml(paths, projectRoot);
| Argument | Meaning |
|---|---|
paths | XML paths for the selected rule kind; use that kind's schema |
projectRoot | Project root used to resolve project-relative paths |
Register only the rule kinds your project uses. XML schemas: Alias, MarshalAs, Extension.
Ordering and lifetime
- Load the assembly with
Assembly.Load. - Call the required Register methods.
- First access / bind the type.
Already bound types are not updated. There is no Reload API. LuaAppDomain.Reset preserves process-level XML tables. Editor Mono methods are no-ops; verify this workflow in Player. Settings XML remains the build-time path for precompiled / AOT assemblies, not an automatic loader for later DLLs.
See HybridCLR integration for an end-to-end example.