Skip to content

fix/il2cpp memory misalignment#44

Open
jfisher993 wants to merge 2 commits intokeijiro:masterfrom
jfisher993:fix/il2cpp-memory-misalignment
Open

fix/il2cpp memory misalignment#44
jfisher993 wants to merge 2 commits intokeijiro:masterfrom
jfisher993:fix/il2cpp-memory-misalignment

Conversation

@jfisher993
Copy link
Copy Markdown

@jfisher993 jfisher993 commented Oct 30, 2025

Issue:
IL2CPP builds are changing the note paths causing mapping issues with Input Actions in Unity's new Input System. This makes it seem like input isn't working in builds when building for IL2CPP.

Solution:
Replaced unsafe fixed byte arrays with explicit byte fields for all MIDI note and control inputs.
This ensures consistent struct layout and correct InputSystem offsets under IL2CPP builds.

Previously, IL2CPP was misaligning fixed buffers, causing MIDI note and control paths (note037 → note124) to read incorrect memory offsets. The new explicit layout guarantees stable bindings across Mono and IL2CPP backends.

…diDeviceState

Replaced unsafe fixed byte arrays with explicit byte fields for all MIDI note and control inputs.
This ensures consistent struct layout and correct InputSystem offsets under IL2CPP builds.

Previously, IL2CPP was misaligning fixed buffers, causing MIDI note and control paths
(note037 → note124) to read incorrect memory offsets. The new explicit layout
guarantees stable bindings across Mono and IL2CPP backends.
This was referenced Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant