Skip to content

Fix standalone player build failure with IL2CPP (#6313)#6314

Open
Codengineer wants to merge 2 commits into
developfrom
bobd/fix_protobuf_dll_issues
Open

Fix standalone player build failure with IL2CPP (#6313)#6314
Codengineer wants to merge 2 commits into
developfrom
bobd/fix_protobuf_dll_issues

Conversation

@Codengineer

Copy link
Copy Markdown
Contributor

Proposed change(s)

Rebuild Google.Protobuf_Packed.dll from source (netstandard2.0) without merging System.Memory/System.Buffers polyfills into the assembly. The previous packed DLL embedded the Span polyfill, which caused IL2CPP to crash in IntrinsicRemap.SpanGetItemArguments during standalone player builds. The rebuilt DLL references System.Memory externally, letting Unity resolve Span through its BCL type-forwarder.

Also set isOverridable to 0 in the plugin meta to prevent com.unity.ai.inference's editor-only copy from shadowing this DLL during builds. Fixes #6310

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

#6313
#6310

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

 Rebuild Google.Protobuf_Packed.dll from source (netstandard2.0) without merging System.Memory/System.Buffers polyfills into the assembly. The previous packed DLL embedded the Span<T> polyfill, which caused IL2CPP to crash in IntrinsicRemap.SpanGetItemArguments during standalone player builds. The rebuilt DLL references System.Memory externally, letting Unity resolve Span<T> through its BCL type-forwarder.

Also set isOverridable to 0 in the plugin meta to prevent com.unity.ai.inference's editor-only copy from shadowing this DLL during builds.
Fixes #6310
@Codengineer
Codengineer requested a review from montplaisir July 21, 2026 20:54

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

Reviewed commit 66e94348

🤖 Helpful? 👍/👎

@montplaisir montplaisir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on MacOS and Windows.

@montplaisir

Copy link
Copy Markdown
Contributor

Please update the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants