diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs b/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs
index 7dfe7f045d..09787c9eeb 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs
@@ -65,7 +65,20 @@ public struct InputEvent
///
public const int InvalidEventId = 0;
+ #if UNITY_INPUT_SYSTEM_INPUT_MODULE_DEFINES_EVENT_PACKING_ALIGNMENT
+ ///
+ /// Defines the packing alignment of native input events in event buffers.
+ ///
+ ///
+ /// This is dictated by the native module implementation which populates the event buffers.
+ ///
+ internal const int kAlignment = NativeInputEvent.alignment;
+ #else
+ ///
+ /// Defines the packing alignment of native input events in event buffers.
+ ///
internal const int kAlignment = 4;
+ #endif
[FieldOffset(0)]
private NativeInputEvent m_Event;
diff --git a/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef b/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef
index 3adff080e5..5ee4329220 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef
+++ b/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef
@@ -107,6 +107,11 @@
"expression": "1",
"define": "UNITY_INPUT_SYSTEM_ENABLE_ANALYTICS"
},
+ {
+ "name": "Unity",
+ "expression": "6000.3.0",
+ "define": "UNITY_INPUT_SYSTEM_INPUT_MODULE_DEFINES_EVENT_PACKING_ALIGNMENT"
+ },
{
"name": "Unity",
"expression": "6000.3.0a6",