Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Packages/com.unity.inputsystem/InputSystem/Events/InputEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,20 @@ public struct InputEvent
/// </summary>
public const int InvalidEventId = 0;

#if UNITY_INPUT_SYSTEM_INPUT_MODULE_DEFINES_EVENT_PACKING_ALIGNMENT
/// <summary>
/// Defines the packing alignment of native input events in event buffers.
/// </summary>
/// <remarks>
/// This is dictated by the native module implementation which populates the event buffers.
/// </remarks>
internal const int kAlignment = NativeInputEvent.alignment;
#else
/// <summary>
/// Defines the packing alignment of native input events in event buffers.
/// </summary>
internal const int kAlignment = 4;
#endif

[FieldOffset(0)]
private NativeInputEvent m_Event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
"name": "com.unity.modules.unityanalytics",
"expression": "1",
"define": "UNITY_INPUT_SYSTEM_ENABLE_ANALYTICS"
},
{
"name": "Unity",
"expression": "6000.3.0",
"define": "UNITY_INPUT_SYSTEM_INPUT_MODULE_DEFINES_EVENT_PACKING_ALIGNMENT"
}
],
"noEngineReferences": false
Expand Down