Skip to content

fix/il2cpp memory misalignment#43

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

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

Conversation

@jfisher993
Copy link
Copy Markdown

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.
@jfisher993 jfisher993 closed this Oct 30, 2025
@jfisher993 jfisher993 deleted the fix/il2cpp-memory-misalignment branch October 30, 2025 23:45
@jfisher993 jfisher993 restored the fix/il2cpp-memory-misalignment branch October 30, 2025 23:50
@jfisher993 jfisher993 deleted the fix/il2cpp-memory-misalignment branch October 30, 2025 23:52
@jfisher993 jfisher993 restored the fix/il2cpp-memory-misalignment branch October 30, 2025 23:53
@jfisher993
Copy link
Copy Markdown
Author

Accidentally closed... new PR: #44

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