Skip to main content

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);
ArgumentMeaning
pathsXML paths for the selected rule kind; use that kind's schema
projectRootProject root used to resolve project-relative paths

Register only the rule kinds your project uses. XML schemas: Alias, MarshalAs, Extension.

Ordering and lifetime​

  1. Load the assembly with Assembly.Load.
  2. Call the required Register methods.
  3. 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.