Firstborn/Library/PackageCache/com.unity.inputsystem@1.5.1/InputSystem/Plugins/XInput/XInputSupport.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

38 lines
1.3 KiB
C#

////TODO: add support for Windows.Gaming.Input.Gamepad (including the trigger motors)
using UnityEngine.InputSystem.Layouts;
namespace UnityEngine.InputSystem.XInput
{
/// <summary>
/// Adds support for XInput controllers.
/// </summary>
#if UNITY_DISABLE_DEFAULT_INPUT_PLUGIN_INITIALIZATION
public
#else
internal
#endif
static class XInputSupport
{
public static void Initialize()
{
// Base layout for Xbox-style gamepad.
InputSystem.RegisterLayout<XInputController>();
////FIXME: layouts should always be available in the editor (mac/win/linux)
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN || UNITY_WSA
InputSystem.RegisterLayout<XInputControllerWindows>(
matches: new InputDeviceMatcher().WithInterface("XInput"));
#endif
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
InputSystem.RegisterLayout<XboxGamepadMacOS>(
matches: new InputDeviceMatcher().WithInterface("HID")
.WithProduct("Xbox.*Wired Controller"));
InputSystem.RegisterLayout<XboxOneGampadMacOSWireless>(
matches: new InputDeviceMatcher().WithInterface("HID")
.WithProduct("Xbox.*Wireless Controller"));
#endif
}
}
}