├── .gitignore ├── Editor.meta ├── Editor ├── ExtensionProcessorEditor.cs ├── ExtensionProcessorEditor.cs.meta ├── Inputter.Editor.asmdef ├── Inputter.Editor.asmdef.meta ├── Inputter.cs └── Inputter.cs.meta ├── LICENSE.txt ├── LICENSE.txt.meta ├── README.md ├── README.md.meta ├── Resources.meta ├── Resources ├── UnityInputter_128x128.png └── UnityInputter_128x128.png.meta ├── Runtime.meta ├── Runtime ├── ExtensionProcessor.cs ├── ExtensionProcessor.cs.meta ├── Inputter.asmdef ├── Inputter.asmdef.meta ├── LogitechG29.cs ├── LogitechG29.cs.meta ├── LogitechSDK.meta ├── LogitechSDK │ ├── Doc.meta │ ├── Doc │ │ ├── C#Instructions.pdf │ │ ├── C#Instructions.pdf.meta │ │ ├── LogitechGamingSteeringWheelSDK.pdf │ │ ├── LogitechGamingSteeringWheelSDK.pdf.meta │ │ ├── UdkDLLBindInstructions.pdf │ │ └── UdkDLLBindInstructions.pdf.meta │ ├── LogitechGSDK.cs │ └── LogitechGSDK.cs.meta ├── MaxProcessor.cs ├── MaxProcessor.cs.meta ├── MinProcessor.cs ├── MinProcessor.cs.meta ├── OneMinusProcessor.cs ├── OneMinusProcessor.cs.meta ├── Plugins.meta └── Plugins │ ├── GameEnginesWrapper.meta │ └── GameEnginesWrapper │ ├── x64.meta │ ├── x64 │ ├── LogitechSteeringWheelEnginesWrapper.dll │ └── LogitechSteeringWheelEnginesWrapper.dll.meta │ ├── x86.meta │ └── x86 │ ├── LogitechSteeringWheelEnginesWrapper.dll │ └── LogitechSteeringWheelEnginesWrapper.dll.meta ├── Samples.meta ├── Samples ├── G29.json ├── G29.json.meta ├── InputterSample_Scene.unity ├── InputterSample_Scene.unity.meta ├── InputterTester.cs ├── InputterTester.cs.meta ├── uInputter_VehicleControls.inputactions └── uInputter_VehicleControls.inputactions.meta ├── package.json └── package.json.meta /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a141c05bea977f647b4f8b9e9b55c4ba 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ExtensionProcessorEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using UnityEngine.InputSystem.Editor; 4 | 5 | namespace Inputter 6 | { 7 | public class ExtensionProcessorEditor : InputParameterEditor 8 | { 9 | public override void OnGUI() 10 | { 11 | var style = new GUIStyle 12 | { 13 | normal = new GUIStyleState 14 | { 15 | textColor = Color.grey, 16 | }, 17 | fontStyle = FontStyle.Italic, 18 | wordWrap = true, 19 | }; 20 | 21 | EditorGUILayout.LabelField("Note: Action Type must be of Pass Through, in order to work", style); 22 | EditorGUILayout.Space(10f); 23 | 24 | target.sensitivitySpeed = EditorGUILayout.FloatField("Sensitivity Speed", target.sensitivitySpeed); 25 | target.gravitySpeed = EditorGUILayout.FloatField("Gravity Speed", target.gravitySpeed); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Editor/ExtensionProcessorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0f71dfe27ba2f742a4af9ea5250652e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Inputter.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Inputter.Runtime.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:4cb071ee81692854ab0e0c65eb9ba25e", 6 | "GUID:75469ad4d38634e559750d17036d5f7c" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /Editor/Inputter.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bb49b9f8811b2141bc97df0d97f2042 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Inputter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | using UnityEditor; 6 | 7 | namespace Inputter.Editor 8 | { 9 | /// 10 | /// Adds the given define symbols to PlayerSettings define symbols. 11 | /// Just add your own define symbols to the Symbols property at the below. 12 | /// 13 | [InitializeOnLoad] 14 | public class Inputter : UnityEditor.Editor 15 | { 16 | /// 17 | /// Symbols that will be added to the editor 18 | /// 19 | public static readonly string[] Symbols = new[] 20 | { 21 | "INPUTTER" 22 | }; 23 | 24 | /// 25 | /// Add define symbols as soon as Unity gets done compiling. 26 | /// 27 | static Inputter() 28 | { 29 | var definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); 30 | 31 | var allDefines = definesString.Split(';').ToList(); 32 | 33 | allDefines.AddRange(Symbols.Except(allDefines)); 34 | 35 | PlayerSettings.SetScriptingDefineSymbolsForGroup( 36 | EditorUserBuildSettings.selectedBuildTargetGroup, 37 | string.Join(";", allDefines.ToArray())); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /Editor/Inputter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35c1a5b8a67114e458c266eee36a791c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 MrRobin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ab07972142992440aeb35d94a7d0b92 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | Inputter logo 4 |

5 | 6 |

Inputter [Unity Engine]

7 | 8 | *Extension tool for the Unity Input System that adds support for the Logitech G29 steering wheel and provides additional functionality for handling input. This tool is designed to enhance the Unity Input System with new features and capabilities, making it easier to work with input devices and manage user interactions in your games and applications.* 9 | 10 |
11 | 12 | [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mrrobinofficial/unity-inputter/blob/HEAD/LICENSE.txt) 13 | ![maintenance-status](https://img.shields.io/badge/maintenance-passively--maintained-yellowgreen.svg) 14 | 15 |
16 | 17 | ## Introduction 18 | 19 | Inputter is a extensions of new input system for Unity with combination of Logitech G SDK. Inputter has a new input device called "LogitechG29" with all force feedback and all buttons/axis. 20 | This "new" input device was built by using [Logitech G SDK](https://www.logitechg.com/en-us/innovation/developer-lab.html). 21 | 22 | ## Installation 23 | 24 | * [Add package](https://docs.unity3d.com/Manual/upm-ui-giturl.html) from this git URL: ```com.mrrobin.inputter``` or https://github.com/MrRobinOfficial/Unity-Inputter.git 25 | 26 | Or 27 | 28 | * Clone repo and extract to your Unity project folder. 29 | 30 | ## Quick guide 31 | 32 | ```c# 33 | using Inputter; 34 | ``` 35 | To access Logitech G29 SDK stuff, just access LogitechG29 input device instead 36 | ```c# 37 | const float MIN_RPM = 0f; 38 | const float MAX_RPM = 15000f; 39 | 40 | float throttleInput = 0.5f; 41 | 42 | LogitechG29.current.PlayLeds(throttleInput * MAX_RPM, MIN_RPM, MAX_RPM); 43 | ``` 44 | For button check, simple use [indexer](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/) to get ButtonControl 45 | ```c# 46 | int speedLimiter = 0; 47 | 48 | if (LogitechG29.current[LogitechG29.G29Button.Plus].wasReleasedThisFrame) 49 | speedLimiter++; 50 | 51 | if (LogitechG29.current[LogitechG29.G29Button.Minus].wasReleasedThisFrame) 52 | speedLimiter--; 53 | ``` 54 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c053f184002dbce4ba094470688f806b 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b29a0de2f3ddc2843bf4f6d37f30e6c0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Resources/UnityInputter_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Resources/UnityInputter_128x128.png -------------------------------------------------------------------------------- /Resources/UnityInputter_128x128.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f7ec8d0afaa3be4cb5bd8ac58b5dd6d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMasterTextureLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | platformSettings: 69 | - serializedVersion: 3 70 | buildTarget: DefaultTexturePlatform 71 | maxTextureSize: 2048 72 | resizeAlgorithm: 0 73 | textureFormat: -1 74 | textureCompression: 1 75 | compressionQuality: 50 76 | crunchedCompression: 0 77 | allowsAlphaSplitting: 0 78 | overridden: 0 79 | androidETC2FallbackOverride: 0 80 | forceMaximumCompressionQuality_BC6H_BC7: 0 81 | spriteSheet: 82 | serializedVersion: 2 83 | sprites: [] 84 | outline: [] 85 | physicsShape: [] 86 | bones: [] 87 | spriteID: 88 | internalID: 0 89 | vertices: [] 90 | indices: 91 | edges: [] 92 | weights: [] 93 | secondaryTextures: [] 94 | nameFileIdTable: {} 95 | spritePackingTag: 96 | pSDRemoveMatte: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7484b7852f632094d8d8b679b143cbde 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/ExtensionProcessor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | #endif 4 | 5 | using UnityEngine; 6 | using UnityEngine.InputSystem; 7 | using UnityEngine.Scripting; 8 | 9 | namespace Inputter 10 | { 11 | #if UNITY_EDITOR 12 | [InitializeOnLoad] 13 | #endif 14 | [Preserve] 15 | public class ExtensionProcessor: InputProcessor 16 | { 17 | [Tooltip("Sensitivity Speed")] 18 | public float sensitivitySpeed = 0; 19 | 20 | [Tooltip("Gravity Speed")] 21 | public float gravitySpeed = 0; 22 | 23 | [HideInInspector] 24 | private float previousValue = 0f; 25 | 26 | public override float Process(float value, InputControl control) 27 | { 28 | if (value == 0) 29 | previousValue = Mathf.MoveTowards(previousValue, 0f, gravitySpeed * Time.unscaledDeltaTime); 30 | 31 | previousValue = Mathf.MoveTowards(previousValue, value, sensitivitySpeed * Time.unscaledDeltaTime); 32 | return previousValue; 33 | } 34 | 35 | #if UNITY_EDITOR 36 | static ExtensionProcessor() => Initialize(); 37 | #endif 38 | 39 | [RuntimeInitializeOnLoadMethod] 40 | static void Initialize() => InputSystem.RegisterProcessor(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Runtime/ExtensionProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c1a598b737eb3647b7bf2de982a3bdd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Inputter.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Inputter.Runtime", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:75469ad4d38634e559750d17036d5f7c" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": true, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Runtime/Inputter.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cb071ee81692854ab0e0c65eb9ba25e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/LogitechG29.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.InputSystem.Layouts; 2 | using UnityEngine.InputSystem.Controls; 3 | using UnityEngine.InputSystem.LowLevel; 4 | using UnityEngine.InputSystem.Utilities; 5 | using UnityEngine.InputSystem; 6 | using UnityEngine.Scripting; 7 | using UnityEngine.Events; 8 | using UnityEngine; 9 | using UnityEngine.InputSystem.Processors; 10 | using System; 11 | 12 | #if UNITY_EDITOR 13 | using UnityEditor; 14 | #endif 15 | 16 | namespace Inputter 17 | { 18 | [Preserve] 19 | [InputControlLayout( 20 | displayName = "Logitech G29", 21 | stateType = typeof(LogitechG29State), 22 | description = "Logitech G29 Racing Wheel with Force Feedback", 23 | stateFormat = "HID")] 24 | #if UNITY_EDITOR 25 | [InitializeOnLoad] 26 | #endif 27 | public sealed class LogitechG29 : InputDevice, IInputUpdateCallbackReceiver 28 | { 29 | public static event UnityAction OnInitialized; 30 | public static event UnityAction OnShutdown; 31 | 32 | #pragma warning disable IDE1006 // Naming Styles 33 | public static LogitechG29 current { get; private set; } 34 | 35 | public static new System.Collections.Generic.IReadOnlyList all => s_AllMyDevices; 36 | private static System.Collections.Generic.List s_AllMyDevices = new(); 37 | 38 | #region Variables 39 | 40 | public bool IsPlayingSpringForce => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_SPRING); 41 | public bool IsPlayingDamperForce => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_DAMPER); 42 | public bool IsPlayingConstantForce => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_CONSTANT); 43 | public bool IsPlayingSurfaceEffect => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_SURFACE_EFFECT); 44 | public bool IsPlayingSoftstopForce => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_SOFTSTOP); 45 | public bool IsPlayingDirtRoadEffect => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_DIRT_ROAD); 46 | public bool IsPlayingBumpyRoadEffect => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_BUMPY_ROAD); 47 | public bool IsPlayingCarAirborne => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_CAR_AIRBORNE); 48 | public bool IsPlayingSlippyRoadEffect => LogitechGSDK.LogiIsPlaying(Index, LogitechGSDK.LOGI_FORCE_SLIPPERY_ROAD); 49 | 50 | public int Index { get; } = 0; 51 | public bool IsConnected => LogitechGSDK.LogiIsDeviceConnected(Index, LogitechGSDK.LOGI_DEVICE_TYPE_WHEEL); 52 | 53 | //public AnyKeyControl anyButton { get; private set; } 54 | public ButtonControl northButton { get; private set; } 55 | public ButtonControl southButton { get; private set; } 56 | public ButtonControl eastButton { get; private set; } 57 | public ButtonControl westButton { get; private set; } 58 | public ButtonControl rightBumper { get; private set; } 59 | public ButtonControl leftBumper { get; private set; } 60 | public ButtonControl rightShift { get; private set; } 61 | public ButtonControl leftShift { get; private set; } 62 | public ButtonControl share { get; private set; } 63 | public ButtonControl options { get; private set; } 64 | public ButtonControl home { get; private set; } 65 | public ButtonControl rightStickButton { get; private set; } 66 | public ButtonControl leftStickButton { get; private set; } 67 | public ButtonControl plus { get; private set; } 68 | public ButtonControl minus { get; private set; } 69 | public ButtonControl rightSpin { get; private set; } 70 | public ButtonControl leftSpin { get; private set; } 71 | public ButtonControl enterSpin { get; private set; } 72 | 73 | public DpadControl hatSwitch { get; private set; } 74 | 75 | public ButtonControl shifter1 { get; private set; } 76 | public ButtonControl shifter2 { get; private set; } 77 | public ButtonControl shifter3 { get; private set; } 78 | public ButtonControl shifter4 { get; private set; } 79 | public ButtonControl shifter5 { get; private set; } 80 | public ButtonControl shifter6 { get; private set; } 81 | public ButtonControl shifter7 { get; private set; } 82 | 83 | public AxisControl steering { get; private set; } 84 | public AxisControl throttle { get; private set; } 85 | public AxisControl brake { get; private set; } 86 | public AxisControl clutch { get; private set; } 87 | 88 | public ButtonControl triangleButton => northButton; 89 | public ButtonControl squareButton => westButton; 90 | public ButtonControl circleButton => eastButton; 91 | public ButtonControl crossButton => southButton; 92 | 93 | #pragma warning restore IDE1006 // Naming Styles 94 | 95 | #endregion 96 | 97 | public enum G29Button : byte 98 | { 99 | South = 0, 100 | West = 1, 101 | East = 2, 102 | North = 3, 103 | 104 | Cross = South, 105 | Triangle = North, 106 | Circle = East, 107 | Square = West, 108 | 109 | RightBumper = 4, 110 | LeftBumper = 5, 111 | RightTrigger = 6, 112 | LeftTrigger = 7, 113 | Share = 8, 114 | Options = 9, 115 | RightStick = 10, 116 | LeftStick = 11, 117 | 118 | Shifter1 = 12, 119 | Shifter2 = 13, 120 | Shifter3 = 14, 121 | Shifter4 = 15, 122 | Shifter5 = 16, 123 | Shifter6 = 17, 124 | Shifter7 = 18, 125 | 126 | Plus = 19, 127 | Minus = 20, 128 | 129 | RightSpin = 21, 130 | LeftSpin = 22, 131 | EnterSpin = 23, 132 | 133 | Home = 24, 134 | 135 | DpadUp, 136 | DpadDown, 137 | DpadLeft, 138 | DpadRight, 139 | } 140 | 141 | public ButtonControl this[G29Button button] => button switch 142 | { 143 | G29Button.Cross => southButton, 144 | G29Button.North => northButton, 145 | G29Button.East => eastButton, 146 | G29Button.West => westButton, 147 | 148 | G29Button.RightBumper => rightBumper, 149 | G29Button.LeftBumper => leftBumper, 150 | G29Button.Options => options, 151 | G29Button.Share => share, 152 | G29Button.Home => home, 153 | G29Button.LeftStick => leftStickButton, 154 | G29Button.RightStick => rightStickButton, 155 | G29Button.LeftTrigger => leftShift, 156 | G29Button.RightTrigger => rightShift, 157 | G29Button.Plus => plus, 158 | G29Button.Minus => minus, 159 | 160 | G29Button.Shifter1 => shifter1, 161 | G29Button.Shifter2 => shifter2, 162 | G29Button.Shifter3 => shifter3, 163 | G29Button.Shifter4 => shifter4, 164 | G29Button.Shifter5 => shifter5, 165 | G29Button.Shifter6 => shifter6, 166 | G29Button.Shifter7 => shifter7, 167 | 168 | G29Button.LeftSpin => leftSpin, 169 | G29Button.RightSpin => rightSpin, 170 | G29Button.EnterSpin => enterSpin, 171 | 172 | G29Button.DpadUp => hatSwitch.up, 173 | G29Button.DpadDown => hatSwitch.down, 174 | G29Button.DpadLeft => hatSwitch.left, 175 | G29Button.DpadRight => hatSwitch.right, 176 | 177 | _ => throw new System.ComponentModel.InvalidEnumArgumentException("button", (int)button, typeof(G29Button)) 178 | }; 179 | 180 | #region Force Feedback 181 | 182 | public void StopAllForceFeedback() 183 | { 184 | if (IsPlayingConstantForce) 185 | StopConstantForce(); 186 | 187 | if (IsPlayingDamperForce) 188 | StopDamperForce(); 189 | 190 | if (IsPlayingBumpyRoadEffect) 191 | StopBumpyRoadEffect(); 192 | 193 | if (IsPlayingCarAirborne) 194 | StopCarAirborne(); 195 | 196 | if (IsPlayingDirtRoadEffect) 197 | StopDirtRoadEffect(); 198 | 199 | if (IsPlayingSlippyRoadEffect) 200 | StopSlipperyRoadEffect(); 201 | 202 | if (IsPlayingSoftstopForce) 203 | StopSoftstopForce(); 204 | 205 | if (IsPlayingSpringForce) 206 | StopSpringForce(); 207 | 208 | if (IsPlayingSurfaceEffect) 209 | StopSurfaceEffect(); 210 | } 211 | 212 | /// 213 | /// The dynamic spring force gets played on the X axis. 214 | /// If a joystick is connected, all forces generated by the Steering Wheel SDK will be played on the X axis. 215 | /// And in addition there will be a constant spring on the Y axis. 216 | /// 217 | /// Specifies the center of the spring force effect. Valid range is -100 to 100. 218 | /// Specifying 0 centers the spring. Any values outside this range are silently clamped. 219 | /// Specify the level of saturation of the spring force effect. 220 | /// The saturation stays constant after a certain deflection from the center of the spring. 221 | /// It is comparable to a magnitude. Valid ranges are 0 to 100. 222 | /// Any value higher than 100 is silently clamped. 223 | /// Specify the slope of the effect strength increase relative 224 | /// to the amount of deflection from the center of the condition. 225 | /// Higher values mean that the saturation level is reached sooner. 226 | /// Valid ranges are -100 to 100. Any value outside the valid range is silently clamped. 227 | public bool PlaySpringForce(int offset, int saturation, int coefficient) 228 | { 229 | if (!IsConnected) 230 | return false; 231 | 232 | return LogitechGSDK.LogiPlaySpringForce(Index, offset, saturation, coefficient); 233 | } 234 | 235 | /// 236 | /// Stop current spring force 237 | /// 238 | /// 239 | public bool StopSpringForce() 240 | { 241 | if (!IsConnected) 242 | return false; 243 | 244 | return LogitechGSDK.LogiStopSpringForce(Index); 245 | } 246 | 247 | /// 248 | /// A constant force works best when continuously updated with a value tied to the physics engine. 249 | /// Tie the steering wheel/joystick to the car's physics engine via a vector force. 250 | /// This will create a centering spring effect, a sliding effect, a feeling for the car's inertia, 251 | /// and depending on the physics engine it should also give side collisions 252 | /// (wheel/joystick jerks in the opposite way of the wall the car just touched). 253 | /// The vector force could for example be calculated from the lateral force measured at the front tires. 254 | /// This vector force should be 0 when at a stop or driving straight. 255 | /// When driving through a turn or when driving on a banked surface the vector force 256 | /// should have a magnitude that grows in a proportional way. 257 | /// 258 | /// Specifies the magnitude of the constant force effect. 259 | /// A negative value reverses the direction of the force. 260 | /// Valid ranges for magnitudePercentage are -100 to 100. 261 | /// Any values outside the valid range are silently clamped. 262 | /// 263 | public bool PlayConstantForce(int magnitude) 264 | { 265 | if (!IsConnected) 266 | return false; 267 | 268 | return LogitechGSDK.LogiPlayConstantForce(Index, magnitude); 269 | } 270 | 271 | /// 272 | /// Stop current constant force 273 | /// 274 | /// 275 | public bool StopConstantForce() 276 | { 277 | if (!IsConnected) 278 | return false; 279 | 280 | return LogitechGSDK.LogiStopConstantForce(Index); 281 | } 282 | 283 | /// 284 | /// Simulate surfaces that are hard to turn on (mud, car at a stop) or slippery surfaces (snow, ice) 285 | /// 286 | /// Specify the slope of the effect strength increase relative 287 | /// to the amount of deflection from the center of the condition. 288 | /// Higher values mean that the saturation level is reached sooner. 289 | /// Valid ranges are -100 to 100. Any value outside the valid range is silently clamped. 290 | /// -100 simulates a very slippery effect, +100 makes the wheel/joystick very hard to move, 291 | /// simulating the car at a stop or in mud. 292 | /// 293 | public bool PlayDamperForce(int coefficient) 294 | { 295 | if (!IsConnected) 296 | return false; 297 | 298 | return LogitechGSDK.LogiPlayDamperForce(Index, coefficient); 299 | } 300 | 301 | /// 302 | /// Stop current damper force 303 | /// 304 | /// 305 | public bool StopDamperForce() 306 | { 307 | if (!IsConnected) 308 | return false; 309 | 310 | return LogitechGSDK.LogiStopDamperForce(Index); 311 | } 312 | 313 | /// 314 | /// 315 | /// : specifies the magnitude of the frontal collision force effect. 316 | /// Valid ranges for magnitudePercentage are 0 to 100. 317 | /// Values higher than 100 are silently clamped. 318 | /// 319 | public bool PlayFontalCollisionForce(int magnitude) 320 | { 321 | if (!IsConnected) 322 | return false; 323 | 324 | return LogitechGSDK.LogiPlayFrontalCollisionForce(Index, magnitude); 325 | } 326 | 327 | /// 328 | /// If you are already using a constant force tied to a vector force from the physics engine, 329 | /// then you may not need to add side collisions since depending on your physics 330 | /// engine the side collisions may automatically be taken care of by the constant force. 331 | /// 332 | /// Specifies the magnitude of the side collision force effect. 333 | /// A negative value reverses the direction of the force. 334 | /// Valid ranges for magnitudePercentage are -100 to 100. 335 | /// Any values outside the valid range are silently clamped. 336 | /// 337 | public bool PlaySideCollisionForce(int magnitude) 338 | { 339 | if (!IsConnected) 340 | return false; 341 | 342 | return LogitechGSDK.LogiPlaySideCollisionForce(Index, magnitude); 343 | } 344 | 345 | /// 346 | /// 347 | /// Specifies the magnitude of the dirt road effect. 348 | /// Valid ranges for magnitudePercentage are 0 to 100. 349 | /// Values higher than 100 are silently clamped. 350 | /// 351 | public bool PlayDirtRoadEffect(int magnitude) 352 | { 353 | if (!IsConnected) 354 | return false; 355 | 356 | return LogitechGSDK.LogiPlayDirtRoadEffect(Index, magnitude); 357 | } 358 | 359 | /// 360 | /// Stop current dirt-road effect 361 | /// 362 | /// 363 | public bool StopDirtRoadEffect() 364 | { 365 | if (!IsConnected) 366 | return false; 367 | 368 | return LogitechGSDK.LogiStopDirtRoadEffect(Index); 369 | } 370 | 371 | /// 372 | /// 373 | /// Specifies the magnitude of the bumpy road effect. 374 | /// Valid ranges for magnitudePercentage are 0 to 100. 375 | /// Values higher than 100 are silently clamped. 376 | /// 377 | public bool PlayBumpyRoadEffect(int magnitude) 378 | { 379 | if (!IsConnected) 380 | return false; 381 | 382 | return LogitechGSDK.LogiPlayBumpyRoadEffect(Index, magnitude); 383 | } 384 | 385 | /// 386 | /// Stop current bumpy-road effect 387 | /// 388 | /// 389 | public bool StopBumpyRoadEffect() 390 | { 391 | if (!IsConnected) 392 | return false; 393 | 394 | return LogitechGSDK.LogiStopBumpyRoadEffect(Index); 395 | } 396 | 397 | /// 398 | /// 399 | /// Specifies the magnitude of the slippery road effect. 400 | /// Valid ranges for magnitudePercentage are 0 to 100. 401 | /// 100 corresponds to the most slippery effect. 402 | /// 403 | public bool PlaySlipperyRoadEffect(int magnitude) 404 | { 405 | if (!IsConnected) 406 | return false; 407 | 408 | return LogitechGSDK.LogiPlaySideCollisionForce(Index, magnitude); 409 | } 410 | 411 | /// 412 | /// Stop current slippery-road effect 413 | /// 414 | /// 415 | public bool StopSlipperyRoadEffect() 416 | { 417 | if (!IsConnected) 418 | return false; 419 | 420 | return LogitechGSDK.LogiStopSlipperyRoadEffect(Index); 421 | } 422 | 423 | public enum SurfaceType 424 | { 425 | Sine = 0, 426 | Square = 1, 427 | Triangle = 2, 428 | } 429 | 430 | /// 431 | /// 432 | /// 433 | /// Specifies the type of force effect. 434 | /// Specifies the magnitude of the surface effect. 435 | /// Valid ranges for magnitudePercentage are 0 to 100. 436 | /// Values higher than 100 are silently clamped. 437 | /// Specifies the period of the periodic force effect. 438 | /// The value is the duration for one full cycle of the periodic function measured in milliseconds. 439 | /// A good range of values for the period is 20 ms (sand) to 120 ms (wooden bridge or cobblestones). 440 | /// For a surface effect the period should not be any bigger than 150 ms. 441 | /// 442 | public bool PlaySurfaceEffect(SurfaceType type, int magnitude, int period) 443 | { 444 | if (!IsConnected) 445 | return false; 446 | 447 | return LogitechGSDK.LogiPlaySurfaceEffect(Index, (int)type, magnitude, period); 448 | } 449 | 450 | /// 451 | /// Stop current surface effect 452 | /// 453 | /// 454 | public bool StopSurfaceEffect() 455 | { 456 | if (!IsConnected) 457 | return false; 458 | 459 | return LogitechGSDK.LogiStopSurfaceEffect(Index); 460 | } 461 | 462 | public bool PlayCarAirborne() 463 | { 464 | if (!IsConnected) 465 | return false; 466 | 467 | return LogitechGSDK.LogiPlayCarAirborne(Index); 468 | } 469 | 470 | /// 471 | /// Stop current airborne effect 472 | /// 473 | /// 474 | public bool StopCarAirborne() 475 | { 476 | if (!IsConnected) 477 | return false; 478 | 479 | return LogitechGSDK.LogiStopCarAirborne(Index); 480 | } 481 | 482 | /// 483 | /// 484 | /// Specifies the deadband in percentage of the softstop force effect. 485 | /// 486 | public bool PlaySoftstopForce(int usableRange) 487 | { 488 | if (!IsConnected) 489 | return false; 490 | 491 | return LogitechGSDK.LogiPlaySoftstopForce(Index, usableRange); 492 | } 493 | 494 | /// 495 | /// Stop current soft-stop force 496 | /// 497 | /// 498 | public bool StopSoftstopForce() 499 | { 500 | if (!IsConnected) 501 | return false; 502 | 503 | return LogitechGSDK.LogiStopSoftstopForce(Index); 504 | } 505 | 506 | #endregion 507 | 508 | #region Methods 509 | 510 | /// 511 | /// Set current Logitech Controller's settings 512 | /// 513 | /// 514 | /// 515 | [Obsolete(".DLL does not support this method")] 516 | public bool SetControllerProperties(LogitechGSDK.LogiControllerPropertiesData propertiesData) 517 | { 518 | if (!IsConnected) 519 | return false; 520 | 521 | return LogitechGSDK.LogiSetPreferredControllerProperties(propertiesData); 522 | } 523 | 524 | /// 525 | /// Get current Logitech Controller's settings 526 | /// 527 | /// 528 | /// 529 | [Obsolete(".DLL does not support this method")] 530 | public bool GetControllerProperties(ref LogitechGSDK.LogiControllerPropertiesData propertiesData) 531 | { 532 | if (!IsConnected) 533 | return false; 534 | 535 | return LogitechGSDK.LogiGetCurrentControllerProperties(Index, ref propertiesData); 536 | } 537 | 538 | public enum ShiftType 539 | { 540 | Unknown, 541 | Sequential, 542 | Gated, 543 | } 544 | 545 | public ShiftType GetShiftType() 546 | { 547 | if (!IsConnected) 548 | return ShiftType.Unknown; 549 | 550 | int value = LogitechGSDK.LogiGetShifterMode(Index); 551 | 552 | return value switch 553 | { 554 | -1 => ShiftType.Unknown, 555 | 0 => ShiftType.Sequential, 556 | 1 => ShiftType.Gated, 557 | _ => ShiftType.Unknown, 558 | }; 559 | } 560 | 561 | public string GetDisplayName() 562 | { 563 | if (!IsConnected) 564 | return string.Empty; 565 | 566 | var deviceName = new System.Text.StringBuilder(256); 567 | LogitechGSDK.LogiGetFriendlyProductName(Index, deviceName, 256); 568 | return deviceName.ToString(); 569 | } 570 | 571 | /// 572 | /// Set current steering wheel range. Prefer (900° degrees) 573 | /// 574 | /// 575 | /// 576 | public bool SetOperatingRange(int range) 577 | { 578 | if (!IsConnected) 579 | return false; 580 | 581 | return LogitechGSDK.LogiSetOperatingRange(Index, range); 582 | } 583 | 584 | /// 585 | /// Get current steering wheel range. 586 | /// 587 | /// 588 | /// 589 | public bool GetOperatingRange(ref int range) 590 | { 591 | if (!IsConnected) 592 | return false; 593 | 594 | return LogitechGSDK.LogiGetOperatingRange(Index, ref range); 595 | } 596 | 597 | /// 598 | /// Set current LEDS with RPM parameters 599 | /// 600 | /// 601 | /// 602 | /// 603 | public bool PlayLeds(float currentRPM, float rpmMin, float rpmMax) 604 | { 605 | if (!IsConnected) 606 | return false; 607 | 608 | return LogitechGSDK.LogiPlayLeds(Index, currentRPM, rpmMin, rpmMax); 609 | } 610 | 611 | #endregion 612 | 613 | #if UNITY_EDITOR 614 | 615 | private const string DEBUG_PATH = "Tools/Inputter/Enable Debug Mode"; 616 | 617 | [MenuItem(DEBUG_PATH)] 618 | private static void EnableDebugMode() 619 | { 620 | var value = !EditorPrefs.GetBool(DEBUG_PATH); 621 | EditorPrefs.SetBool(DEBUG_PATH, value); 622 | Menu.SetChecked(DEBUG_PATH, value); 623 | } 624 | 625 | static LogitechG29() => Init(); 626 | #endif 627 | 628 | private const bool IGNORE_XINPUT_CONTROLLERS = false; 629 | 630 | public override void MakeCurrent() 631 | { 632 | base.MakeCurrent(); 633 | current = this; 634 | } 635 | 636 | protected override void OnAdded() 637 | { 638 | base.OnAdded(); 639 | s_AllMyDevices.Add(this); 640 | } 641 | 642 | protected override void OnRemoved() 643 | { 644 | base.OnRemoved(); 645 | 646 | if (current == this) 647 | current = null; 648 | 649 | s_AllMyDevices.Remove(this); 650 | } 651 | 652 | protected override void FinishSetup() 653 | { 654 | steering = GetChildControl("stick/x"); 655 | throttle = GetChildControl("throttleAxis"); 656 | brake = GetChildControl("brakeAxis"); 657 | clutch = GetChildControl("clutchAxis"); 658 | 659 | northButton = GetChildControl("northButton"); 660 | southButton = GetChildControl("southButton"); 661 | eastButton = GetChildControl("eastButton"); 662 | westButton = GetChildControl("westButton"); 663 | 664 | rightBumper = GetChildControl("rightBumperButton"); 665 | leftBumper = GetChildControl("leftBumperButton"); 666 | rightShift = GetChildControl("rightShiftButton"); 667 | leftShift = GetChildControl("leftShiftButton"); 668 | rightStickButton = GetChildControl("rightStickButton"); 669 | leftStickButton = GetChildControl("leftStickButton"); 670 | share = GetChildControl("shareButton"); 671 | options = GetChildControl("optionsButton"); 672 | home = GetChildControl("homeButton"); 673 | plus = GetChildControl("plusButton"); 674 | minus = GetChildControl("minusButton"); 675 | rightSpin = GetChildControl("rightTurnButton"); 676 | leftSpin = GetChildControl("leftTurnButton"); 677 | enterSpin = GetChildControl("returnButton"); 678 | hatSwitch = GetChildControl("hatSwitch"); 679 | 680 | shifter1 = GetChildControl("shifter1"); 681 | shifter2 = GetChildControl("shifter2"); 682 | shifter3 = GetChildControl("shifter3"); 683 | shifter4 = GetChildControl("shifter4"); 684 | shifter5 = GetChildControl("shifter5"); 685 | shifter6 = GetChildControl("shifter6"); 686 | shifter7 = GetChildControl("shifter7"); 687 | 688 | base.FinishSetup(); 689 | } 690 | 691 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] 692 | private static void Init() 693 | { 694 | InputSystem.RegisterLayout 695 | ( 696 | name: "Logitech G29 Racing Wheel", 697 | matches: new InputDeviceMatcher() 698 | .WithInterface("HID") 699 | .WithManufacturer("Logitech") 700 | .WithProduct("G29 Driving Force Racing Wheel") 701 | .WithCapability("vendorId", 0x46D) 702 | .WithCapability("productId", 0xC24F) 703 | .WithCapability("usagePage", 1) 704 | //.WithCapability("usage", 4) 705 | //.WithVersion("35072") 706 | //.WithCapability("usagePage", "GenericDesktop") 707 | ); 708 | 709 | if (!Application.isPlaying) 710 | return; 711 | 712 | var init = LogitechGSDK.LogiSteeringInitialize(IGNORE_XINPUT_CONTROLLERS); 713 | Application.quitting += OnQuit; 714 | 715 | #if UNITY_EDITOR 716 | if (EditorPrefs.GetBool(DEBUG_PATH)) 717 | { 718 | if (init) 719 | Debug.Log("Logitech G29 has been initialized!"); 720 | else 721 | Debug.LogError("Logitech G29 has not been initialized!"); 722 | } 723 | #endif 724 | 725 | OnInitialized?.Invoke(); 726 | } 727 | 728 | private static void OnQuit() 729 | { 730 | Application.quitting -= OnQuit; 731 | 732 | if (current != null) 733 | current.StopAllForceFeedback(); 734 | 735 | LogitechGSDK.LogiSteeringShutdown(); 736 | 737 | #if UNITY_EDITOR 738 | if (EditorPrefs.GetBool(DEBUG_PATH)) 739 | Debug.Log("Logitech G29 has been shutdown"); 740 | #endif 741 | 742 | OnShutdown?.Invoke(); 743 | } 744 | 745 | public void OnUpdate() 746 | { 747 | if (!IsConnected) 748 | return; 749 | 750 | // if the return value is false, means that the application has not been initialized 751 | if (!LogitechGSDK.LogiUpdate()) 752 | return; 753 | } 754 | } 755 | 756 | [Preserve] 757 | public struct LogitechG29State : IInputStateTypeInfo 758 | { 759 | public static FourCC kFormat => new('J', 'O', 'Y'); 760 | 761 | [InputControl(name = "hatSwitch", displayName = "Hat Switch", layout = "Dpad", format = "BIT", bit = 0, defaultState = 8, sizeInBits = 4, offset = 1)] 762 | [InputControl(name = "hatSwitch/up", displayName = "Hat Up", layout = "DiscreteButton", format = "BIT", bit = 0, sizeInBits = 4, parameters = "minValue=7,maxValue=1,nullValue=8,wrapAtValue=7")] 763 | [InputControl(name = "hatSwitch/right", displayName = "Hat Right", layout = "DiscreteButton", format = "BIT", bit = 0, sizeInBits = 4, parameters = "minValue=1,maxValue=3")] 764 | [InputControl(name = "hatSwitch/left", displayName = "Hat Left", layout = "DiscreteButton", format = "BIT", bit = 0, sizeInBits = 4, parameters = "minValue=5,maxValue=7")] 765 | [InputControl(name = "hatSwitch/down", displayName = "Hat Down", layout = "DiscreteButton", format = "BIT", bit = 0, sizeInBits = 4, parameters = "minValue=3,maxValue=5")] 766 | [InputControl(name = "southButton", layout = "Button", offset = 1, bit = 4, usages = new string[] 767 | { 768 | "PrimaryAction", 769 | "Submit" 770 | }, aliases = new string[] 771 | { 772 | "a", 773 | "cross" 774 | }, displayName = "South Button", shortDisplayName = "A")] 775 | [InputControl(name = "westButton", layout = "Button", offset = 1, bit = 5, usage = "SecondaryAction", aliases = new string[] 776 | { 777 | "x", 778 | "square" 779 | }, displayName = "West Button", shortDisplayName = "X")] 780 | [InputControl(name = "eastButton", layout = "Button", offset = 1, bit = 6, usages = new string[] 781 | { 782 | "Back", 783 | "Cancel" 784 | }, aliases = new string[] 785 | { 786 | "b", 787 | "circle" 788 | }, displayName = "East Button", shortDisplayName = "B")] 789 | [InputControl(name = "northButton", layout = "Button", offset = 1, bit = 7, aliases = new string[] 790 | { 791 | "y", 792 | "triangle" 793 | }, displayName = "North Button", shortDisplayName = "Y")] 794 | public int mainButtons; 795 | 796 | [InputControl(name = "rightShiftButton", displayName = "Right Shift Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 0)] 797 | [InputControl(name = "leftShiftButton", displayName = "Left Shift Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 1)] 798 | [InputControl(name = "rightBumperButton", displayName = "Right Bumper Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 2)] 799 | [InputControl(name = "leftBumperButton", displayName = "Left Bumper Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 3)] 800 | [InputControl(name = "shareButton", displayName = "Share Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 4)] 801 | [InputControl(name = "optionsButton", displayName = "Options Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 5)] 802 | [InputControl(name = "rightStickButton", displayName = "Right Stick Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 6)] 803 | [InputControl(name = "leftStickButton", displayName = "Left Stick Button", layout = "Button", shortDisplayName = "", offset = 2, bit = 7)] 804 | public bool miscButtons; 805 | 806 | [InputControl(name = "shifter1", displayName = "Shifter 1", layout = "Button", offset = 3, bit = 0)] 807 | [InputControl(name = "shifter2", displayName = "Shifter 2", layout = "Button", offset = 3, bit = 1)] 808 | [InputControl(name = "shifter3", displayName = "Shifter 3", layout = "Button", offset = 3, bit = 2)] 809 | [InputControl(name = "shifter4", displayName = "Shifter 4", layout = "Button", offset = 3, bit = 3)] 810 | [InputControl(name = "shifter5", displayName = "Shifter 5", layout = "Button", offset = 3, bit = 4)] 811 | [InputControl(name = "shifter6", displayName = "Shifter 6", layout = "Button", offset = 3, bit = 5)] 812 | [InputControl(name = "shifter7", displayName = "Shifter 7", layout = "Button", offset = 3, bit = 6)] 813 | [InputControl(name = "plusButton", displayName = "Plus Button", layout = "Button", offset = 3, bit = 7)] 814 | public bool plus; 815 | 816 | [InputControl(name = "minusButton", displayName = "Minus Button", layout = "Button", shortDisplayName = "-", offset = 4, bit = 0)] 817 | [InputControl(name = "rightTurnButton", displayName = "Right Turn Button", layout = "Button", shortDisplayName = "→", offset = 4, bit = 1)] 818 | [InputControl(name = "leftTurnButton", displayName = "Left Turn Button", layout = "Button", shortDisplayName = "←", offset = 4, bit = 2)] 819 | [InputControl(name = "returnButton", displayName = "Return Button", layout = "Button", shortDisplayName = "↩", offset = 4, bit = 3)] 820 | [InputControl(name = "homeButton", displayName = "Home Button", layout = "Button", shortDisplayName = "◈", offset = 4, bit = 4)] 821 | public bool minus; 822 | 823 | //[InputControl(name = "steeringAxis", displayName = "Steering Axis", layout = "Axis", shortDisplayName = "steering", offset = 5/*, parameters = "normalize,normalizeMin=-1,normalizeMax=1,normalizeZero=0,clamp,clampMin=-1,clampMax=1"*/, processors = "axisDeadzone", defaultState = short.MaxValue)] 824 | //public short steering; 825 | 826 | [InputControl(name = "stick", displayName = "Stick", layout = "Stick", format = "VEC2", usage = "Primary2DMotion", processors = "stickDeadzone", offset = 5, sizeInBits = 40)] 827 | public Vector2 stick; 828 | [InputControl(name = "stick/x", format = "BIT", offset = 0, sizeInBits = 16, parameters = "normalize=true, normalizeMin=0, normalizeMax=1, normalizeZero=0.5", processors = "axisDeadzone", defaultState = short.MaxValue)] 829 | public short x; 830 | [InputControl(name = "stick/y", format = "BIT", offset = 0, sizeInBits = 16, parameters = "normalize=true, normalizeMin=0, normalizeMax=1, normalizeZero=0.5", processors = "axisDeadzone", defaultState = short.MaxValue)] 831 | public short y; 832 | 833 | [InputControl(name = "throttleAxis", displayName = "Throttle Axis", layout = "Axis", shortDisplayName = "throttle", offset = 7, parameters = "normalize=true,normalizeMin=1,normalizeMax=0,normalizeZero=0.5")] 834 | public byte throttle; 835 | 836 | [InputControl(name = "brakeAxis", displayName = "Brake Axis", layout = "Axis", shortDisplayName = "brake", offset = 8, parameters = "normalize=true,normalizeMin=1,normalizeMax=0,normalizeZero=0.5")] 837 | public byte brake; 838 | 839 | [InputControl(name = "clutchAxis", displayName = "Clutch Axis", layout = "Axis", shortDisplayName = "clutch", offset = 9, parameters = "normalize=true,normalizeMin=1,normalizeMax=0,normalizeZero=0.5")] 840 | public byte clutch; 841 | 842 | public FourCC format => kFormat; 843 | } 844 | 845 | } -------------------------------------------------------------------------------- /Runtime/LogitechG29.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0040d32e34bad6419061597d2f9fe89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7783538a48775d9428443906988ce234 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94e1f864b7691634a812e953e0fd9156 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/C#Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Runtime/LogitechSDK/Doc/C#Instructions.pdf -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/C#Instructions.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c22809303c5bf4149a55321577120c03 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/LogitechGamingSteeringWheelSDK.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Runtime/LogitechSDK/Doc/LogitechGamingSteeringWheelSDK.pdf -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/LogitechGamingSteeringWheelSDK.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfe496b8bbf23ff408fa54c5d59862de 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/UdkDLLBindInstructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Runtime/LogitechSDK/Doc/UdkDLLBindInstructions.pdf -------------------------------------------------------------------------------- /Runtime/LogitechSDK/Doc/UdkDLLBindInstructions.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7af76be50dbc86499807421ea695eda 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/LogitechSDK/LogitechGSDK.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | public class LogitechGSDK 4 | { 5 | //STEERING WHEEL SDK 6 | public const int LOGI_MAX_CONTROLLERS = 4; 7 | 8 | //Force types 9 | public const int LOGI_FORCE_NONE = -1; 10 | public const int LOGI_FORCE_SPRING = 0; 11 | public const int LOGI_FORCE_CONSTANT = 1; 12 | public const int LOGI_FORCE_DAMPER = 2; 13 | public const int LOGI_FORCE_SIDE_COLLISION = 3; 14 | public const int LOGI_FORCE_FRONTAL_COLLISION = 4; 15 | public const int LOGI_FORCE_DIRT_ROAD = 5; 16 | public const int LOGI_FORCE_BUMPY_ROAD = 6; 17 | public const int LOGI_FORCE_SLIPPERY_ROAD = 7; 18 | public const int LOGI_FORCE_SURFACE_EFFECT = 8; 19 | public const int LOGI_NUMBER_FORCE_EFFECTS = 9; 20 | public const int LOGI_FORCE_SOFTSTOP = 10; 21 | public const int LOGI_FORCE_CAR_AIRBORNE = 11; 22 | 23 | //Periodic types for surface effect 24 | public const int LOGI_PERIODICTYPE_NONE = -1; 25 | public const int LOGI_PERIODICTYPE_SINE = 0; 26 | public const int LOGI_PERIODICTYPE_SQUARE = 1; 27 | public const int LOGI_PERIODICTYPE_TRIANGLE = 2; 28 | 29 | //Devices types 30 | public const int LOGI_DEVICE_TYPE_NONE = -1; 31 | public const int LOGI_DEVICE_TYPE_WHEEL = 0; 32 | public const int LOGI_DEVICE_TYPE_JOYSTICK = 1; 33 | public const int LOGI_DEVICE_TYPE_GAMEPAD = 2; 34 | public const int LOGI_DEVICE_TYPE_OTHER = 3; 35 | public const int LOGI_NUMBER_DEVICE_TYPES = 4; 36 | 37 | //Manufacturer types 38 | public const int LOGI_MANUFACTURER_NONE = -1; 39 | public const int LOGI_MANUFACTURER_LOGITECH = 0; 40 | public const int LOGI_MANUFACTURER_MICROSOFT = 1; 41 | public const int LOGI_MANUFACTURER_OTHER = 2; 42 | 43 | //Model types 44 | public const int LOGI_MODEL_G27 = 0; 45 | public const int LOGI_MODEL_DRIVING_FORCE_GT = 1; 46 | public const int LOGI_MODEL_G25 = 2; 47 | public const int LOGI_MODEL_MOMO_RACING = 3; 48 | public const int LOGI_MODEL_MOMO_FORCE = 4; 49 | public const int LOGI_MODEL_DRIVING_FORCE_PRO = 5; 50 | public const int LOGI_MODEL_DRIVING_FORCE = 6; 51 | public const int LOGI_MODEL_NASCAR_RACING_WHEEL = 7; 52 | public const int LOGI_MODEL_FORMULA_FORCE = 8; 53 | public const int LOGI_MODEL_FORMULA_FORCE_GP = 9; 54 | public const int LOGI_MODEL_FORCE_3D_PRO = 10; 55 | public const int LOGI_MODEL_EXTREME_3D_PRO = 11; 56 | public const int LOGI_MODEL_FREEDOM_24 = 12; 57 | public const int LOGI_MODEL_ATTACK_3 = 13; 58 | public const int LOGI_MODEL_FORCE_3D = 14; 59 | public const int LOGI_MODEL_STRIKE_FORCE_3D = 15; 60 | public const int LOGI_MODEL_G940_JOYSTICK = 16; 61 | public const int LOGI_MODEL_G940_THROTTLE = 17; 62 | public const int LOGI_MODEL_G940_PEDALS = 18; 63 | public const int LOGI_MODEL_RUMBLEPAD = 19; 64 | public const int LOGI_MODEL_RUMBLEPAD_2 = 20; 65 | public const int LOGI_MODEL_CORDLESS_RUMBLEPAD_2 = 21; 66 | public const int LOGI_MODEL_CORDLESS_GAMEPAD = 22; 67 | public const int LOGI_MODEL_DUAL_ACTION_GAMEPAD = 23; 68 | public const int LOGI_MODEL_PRECISION_GAMEPAD_2 = 24; 69 | public const int LOGI_MODEL_CHILLSTREAM = 25; 70 | public const int LOGI_MODEL_G29 = 26; 71 | public const int LOGI_MODEL_G920 = 27; 72 | public const int LOGI_NUMBER_MODELS = 28; 73 | 74 | [StructLayout(LayoutKind.Sequential, Pack = 2)] 75 | public struct LogiControllerPropertiesData 76 | { 77 | public bool forceEnable; 78 | public int overallGain; 79 | public int springGain; 80 | public int damperGain; 81 | public bool defaultSpringEnabled; 82 | public int defaultSpringGain; 83 | public bool combinePedals; 84 | public int wheelRange; 85 | public bool gameSettingsEnabled; 86 | public bool allowGameSettings; 87 | 88 | public override string ToString() 89 | { 90 | var builder = new System.Text.StringBuilder(); 91 | builder.AppendLine($"Properties Data"); 92 | builder.AppendLine($"Force Enable: {forceEnable}"); 93 | builder.AppendLine($"Overall Gain: {overallGain}%"); 94 | builder.AppendLine($"Spring Gain: {springGain}%"); 95 | builder.AppendLine($"Damper Gain: {damperGain}%"); 96 | builder.AppendLine($"Default Spring Enabled: {defaultSpringEnabled}"); 97 | builder.AppendLine($"Default Spring Gain: {defaultSpringGain}%"); 98 | builder.AppendLine($"Combine Pedals: {combinePedals}"); 99 | builder.AppendLine($"Wheel Range: {wheelRange}°"); 100 | builder.AppendLine($"Game Settings Enabled: {gameSettingsEnabled}"); 101 | builder.AppendLine($"Allow Game Settings: {allowGameSettings}"); 102 | return builder.ToString(); 103 | } 104 | } 105 | 106 | [StructLayout(LayoutKind.Sequential, Pack = 2)] 107 | public struct DIJOYSTATE2ENGINES 108 | { 109 | public int lX; /* x-axis position */ 110 | public int lY; /* y-axis position */ 111 | public int lZ; /* z-axis position */ 112 | public int lRx; /* x-axis rotation */ 113 | public int lRy; /* y-axis rotation */ 114 | public int lRz; /* z-axis rotation */ 115 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] 116 | public int[] rglSlider; /* extra axes positions */ 117 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] 118 | public uint[] rgdwPOV; /* POV directions */ 119 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] 120 | public byte[] rgbButtons; /* 128 buttons */ 121 | public int lVX; /* x-axis velocity */ 122 | public int lVY; /* y-axis velocity */ 123 | public int lVZ; /* z-axis velocity */ 124 | public int lVRx; /* x-axis angular velocity */ 125 | public int lVRy; /* y-axis angular velocity */ 126 | public int lVRz; /* z-axis angular velocity */ 127 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] 128 | public int[] rglVSlider; /* extra axes velocities */ 129 | public int lAX; /* x-axis acceleration */ 130 | public int lAY; /* y-axis acceleration */ 131 | public int lAZ; /* z-axis acceleration */ 132 | public int lARx; /* x-axis angular acceleration */ 133 | public int lARy; /* y-axis angular acceleration */ 134 | public int lARz; /* z-axis angular acceleration */ 135 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] 136 | public int[] rglASlider; /* extra axes accelerations */ 137 | public int lFX; /* x-axis force */ 138 | public int lFY; /* y-axis force */ 139 | public int lFZ; /* z-axis force */ 140 | public int lFRx; /* x-axis torque */ 141 | public int lFRy; /* y-axis torque */ 142 | public int lFRz; /* z-axis torque */ 143 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] 144 | public int[] rglFSlider; /* extra axes forces */ 145 | }; 146 | 147 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 148 | public static extern bool LogiSteeringInitialize(bool ignoreXInputControllers); 149 | 150 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 151 | public static extern bool LogiUpdate(); 152 | 153 | [DllImport("LogitechSteeringWheelEnginesWrapper", CallingConvention = CallingConvention.Cdecl)] 154 | public static extern System.IntPtr LogiGetStateENGINES(int index); 155 | 156 | public static DIJOYSTATE2ENGINES LogiGetStateCSharp(int index) 157 | { 158 | var ret = new DIJOYSTATE2ENGINES 159 | { 160 | rglSlider = new int[2], 161 | rgdwPOV = new uint[4], 162 | rgbButtons = new byte[128], 163 | rglVSlider = new int[2], 164 | rglASlider = new int[2], 165 | rglFSlider = new int[2] 166 | }; 167 | 168 | try 169 | { 170 | ret = (DIJOYSTATE2ENGINES)Marshal.PtrToStructure(LogiGetStateENGINES(index), typeof(DIJOYSTATE2ENGINES)); 171 | } 172 | catch (System.ArgumentException) 173 | { 174 | UnityEngine.Debug.LogError("Exception catched"); 175 | } 176 | 177 | return ret; 178 | } 179 | 180 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 181 | public static extern bool LogiGetDevicePath(int index, System.Text.StringBuilder str, int size); 182 | 183 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 184 | public static extern bool LogiGetFriendlyProductName(int index, System.Text.StringBuilder str, int size); 185 | 186 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 187 | public static extern bool LogiIsConnected(int index); 188 | 189 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 190 | public static extern bool LogiIsDeviceConnected(int index, int deviceType); 191 | 192 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 193 | public static extern bool LogiIsManufacturerConnected(int index, int manufacturerName); 194 | 195 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 196 | public static extern bool LogiIsModelConnected(int index, int modelName); 197 | 198 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 199 | public static extern bool LogiButtonTriggered(int index, int buttonNbr); 200 | 201 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 202 | public static extern bool LogiButtonReleased(int index, int buttonNbr); 203 | 204 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 205 | public static extern bool LogiButtonIsPressed(int index, int buttonNbr); 206 | 207 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 208 | public static extern bool LogiGenerateNonLinearValues(int index, int nonLinCoeff); 209 | 210 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 211 | public static extern int LogiGetNonLinearValue(int index, int inputValue); 212 | 213 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 214 | public static extern bool LogiHasForceFeedback(int index); 215 | 216 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 217 | public static extern bool LogiIsPlaying(int index, int forceType); 218 | 219 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 220 | public static extern bool LogiPlaySpringForce(int index, int offsetPercentage, int saturationPercentage, int coefficientPercentage); 221 | 222 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 223 | public static extern bool LogiStopSpringForce(int index); 224 | 225 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 226 | public static extern bool LogiPlayConstantForce(int index, int magnitudePercentage); 227 | 228 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 229 | public static extern bool LogiStopConstantForce(int index); 230 | 231 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 232 | public static extern bool LogiPlayDamperForce(int index, int coefficientPercentage); 233 | 234 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 235 | public static extern bool LogiStopDamperForce(int index); 236 | 237 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 238 | public static extern bool LogiPlaySideCollisionForce(int index, int magnitudePercentage); 239 | 240 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 241 | public static extern bool LogiPlayFrontalCollisionForce(int index, int magnitudePercentage); 242 | 243 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 244 | public static extern bool LogiPlayDirtRoadEffect(int index, int magnitudePercentage); 245 | 246 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 247 | public static extern bool LogiStopDirtRoadEffect(int index); 248 | 249 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 250 | public static extern bool LogiPlayBumpyRoadEffect(int index, int magnitudePercentage); 251 | 252 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 253 | public static extern bool LogiStopBumpyRoadEffect(int index); 254 | 255 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 256 | public static extern bool LogiPlaySlipperyRoadEffect(int index, int magnitudePercentage); 257 | 258 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 259 | public static extern bool LogiStopSlipperyRoadEffect(int index); 260 | 261 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 262 | public static extern bool LogiPlaySurfaceEffect(int index, int type, int magnitudePercentage, int period); 263 | 264 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 265 | public static extern bool LogiStopSurfaceEffect(int index); 266 | 267 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 268 | public static extern bool LogiPlayCarAirborne(int index); 269 | 270 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 271 | public static extern bool LogiStopCarAirborne(int index); 272 | 273 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 274 | public static extern bool LogiPlaySoftstopForce(int index, int usableRangePercentage); 275 | 276 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 277 | public static extern bool LogiStopSoftstopForce(int index); 278 | 279 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 280 | public static extern bool LogiSetPreferredControllerProperties(LogiControllerPropertiesData properties); 281 | 282 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 283 | public static extern bool LogiGetCurrentControllerProperties(int index, ref LogiControllerPropertiesData properties); 284 | 285 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 286 | public static extern int LogiGetShifterMode(int index); 287 | 288 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 289 | public static extern bool LogiSetOperatingRange(int index, int range); 290 | 291 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 292 | public static extern bool LogiGetOperatingRange(int index, ref int range); 293 | 294 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 295 | public static extern bool LogiPlayLeds(int index, float currentRPM, float rpmFirstLedTurnsOn, float rpmRedLine); 296 | 297 | [DllImport("LogitechSteeringWheelEnginesWrapper", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] 298 | public static extern void LogiSteeringShutdown(); 299 | } -------------------------------------------------------------------------------- /Runtime/LogitechSDK/LogitechGSDK.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d5bb0ecf2ee29d4fa88c550ea8d2f51 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/MaxProcessor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | #endif 4 | 5 | using UnityEngine; 6 | using UnityEngine.InputSystem; 7 | using UnityEngine.Scripting; 8 | 9 | namespace Inputter 10 | { 11 | #if UNITY_EDITOR 12 | [InitializeOnLoad] 13 | #endif 14 | [Preserve] 15 | public class MaxProcessor: InputProcessor 16 | { 17 | public float maxValue = 0; 18 | 19 | public override float Process(float value, InputControl control) => Mathf.Max(maxValue, value); 20 | 21 | #if UNITY_EDITOR 22 | static MaxProcessor() => Initialize(); 23 | #endif 24 | 25 | [RuntimeInitializeOnLoadMethod] 26 | static void Initialize() => InputSystem.RegisterProcessor(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/MaxProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0aecde2ea1cebd9478c69cc452f87a49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/MinProcessor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | #endif 4 | 5 | using UnityEngine; 6 | using UnityEngine.InputSystem; 7 | using UnityEngine.Scripting; 8 | 9 | namespace Inputter 10 | { 11 | #if UNITY_EDITOR 12 | [InitializeOnLoad] 13 | #endif 14 | [Preserve] 15 | public class MinProcessor : InputProcessor 16 | { 17 | public float minValue = 0; 18 | 19 | public override float Process(float value, InputControl control) => Mathf.Min(minValue, value); 20 | 21 | #if UNITY_EDITOR 22 | static MinProcessor() => Initialize(); 23 | #endif 24 | 25 | [RuntimeInitializeOnLoadMethod] 26 | static void Initialize() => InputSystem.RegisterProcessor(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/MinProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36397d16bd5a5b644834853978181e31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/OneMinusProcessor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | #endif 4 | 5 | using UnityEngine; 6 | using UnityEngine.InputSystem; 7 | using UnityEngine.Scripting; 8 | 9 | namespace Inputter 10 | { 11 | #if UNITY_EDITOR 12 | [InitializeOnLoad] 13 | #endif 14 | [Preserve] 15 | public class OneMinusProcessor: InputProcessor 16 | { 17 | public override float Process(float value, InputControl control) => 1f - value; 18 | 19 | #if UNITY_EDITOR 20 | static OneMinusProcessor() => Initialize(); 21 | #endif 22 | 23 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] 24 | static void Initialize() => InputSystem.RegisterProcessor(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Runtime/OneMinusProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 749f028d84e4dab47805e9848570b838 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b4635a4d38890f429cc8a2132635eb2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e49924fee79ba8c4db9edd09b78f0cfe 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b0b6fba9052d714982b1ee4589271a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x64/LogitechSteeringWheelEnginesWrapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Runtime/Plugins/GameEnginesWrapper/x64/LogitechSteeringWheelEnginesWrapper.dll -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x64/LogitechSteeringWheelEnginesWrapper.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdb2a8d213155ef4883da2b7b14c3fb1 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 0 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude Win: 1 23 | Exclude Win64: 0 24 | - first: 25 | Any: 26 | second: 27 | enabled: 1 28 | settings: {} 29 | - first: 30 | Editor: Editor 31 | second: 32 | enabled: 1 33 | settings: 34 | CPU: AnyCPU 35 | DefaultValueInitialized: true 36 | OS: AnyOS 37 | - first: 38 | Standalone: Linux64 39 | second: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | - first: 44 | Standalone: OSXUniversal 45 | second: 46 | enabled: 1 47 | settings: 48 | CPU: None 49 | - first: 50 | Standalone: Win 51 | second: 52 | enabled: 0 53 | settings: 54 | CPU: None 55 | - first: 56 | Standalone: Win64 57 | second: 58 | enabled: 1 59 | settings: 60 | CPU: x86_64 61 | userData: 62 | assetBundleName: 63 | assetBundleVariant: 64 | -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4f73ce2fa01a2548a6c04e4c4157988 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x86/LogitechSteeringWheelEnginesWrapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrRobinOfficial/Unity-Inputter/c0b2c2a16a4ac3ba5471d05ae48e922e9717a632/Runtime/Plugins/GameEnginesWrapper/x86/LogitechSteeringWheelEnginesWrapper.dll -------------------------------------------------------------------------------- /Runtime/Plugins/GameEnginesWrapper/x86/LogitechSteeringWheelEnginesWrapper.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74548c59878b70e419011b58cc42040b 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Editor: 1 20 | Exclude Linux64: 0 21 | Exclude OSXUniversal: 0 22 | Exclude Win: 0 23 | Exclude Win64: 1 24 | - first: 25 | Any: 26 | second: 27 | enabled: 1 28 | settings: {} 29 | - first: 30 | Editor: Editor 31 | second: 32 | enabled: 0 33 | settings: 34 | CPU: AnyCPU 35 | DefaultValueInitialized: true 36 | OS: AnyOS 37 | - first: 38 | Standalone: Linux64 39 | second: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | - first: 44 | Standalone: OSXUniversal 45 | second: 46 | enabled: 1 47 | settings: 48 | CPU: None 49 | - first: 50 | Standalone: Win 51 | second: 52 | enabled: 1 53 | settings: 54 | CPU: x86 55 | - first: 56 | Standalone: Win64 57 | second: 58 | enabled: 0 59 | settings: 60 | CPU: None 61 | userData: 62 | assetBundleName: 63 | assetBundleVariant: 64 | -------------------------------------------------------------------------------- /Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 707c0e33a103236439a107b94a065f58 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/G29.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HID::Logitech G29 Driving Force Racing Wheel", 3 | "extend": "Joystick", 4 | "extendMultiple": [], 5 | "format": "HID ", 6 | "beforeRender": "", 7 | "commonUsages": [], 8 | "displayName": "G29 Driving Force Racing Wheel", 9 | "description": "", 10 | "type": "UnityEngine.InputSystem.Joystick, Unity.InputSystem, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null", 11 | "variant": "", 12 | "isGenericTypeOfDevice": false, 13 | "hideInUI": false, 14 | "controls": [ 15 | { 16 | "name": "stick", 17 | "layout": "Stick", 18 | "variants": "", 19 | "usage": "", 20 | "alias": "", 21 | "useStateFrom": "", 22 | "offset": 5, 23 | "bit": 0, 24 | "sizeInBits": 40, 25 | "format": "VEC2", 26 | "arraySize": 0, 27 | "usages": [ 28 | "Primary2DMotion" 29 | ], 30 | "aliases": [], 31 | "parameters": "", 32 | "processors": "stickDeadzone", 33 | "displayName": "Stick", 34 | "shortDisplayName": "", 35 | "noisy": false, 36 | "synthetic": false, 37 | "defaultState": "", 38 | "minValue": "", 39 | "maxValue": "" 40 | }, 41 | { 42 | "name": "stick/x", 43 | "layout": "", 44 | "variants": "", 45 | "usage": "", 46 | "alias": "", 47 | "useStateFrom": "", 48 | "offset": 0, 49 | "bit": 0, 50 | "sizeInBits": 16, 51 | "format": "BIT ", 52 | "arraySize": 0, 53 | "usages": [], 54 | "aliases": [], 55 | "parameters": "normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5", 56 | "processors": "axisDeadzone", 57 | "displayName": "", 58 | "shortDisplayName": "", 59 | "noisy": false, 60 | "synthetic": false, 61 | "defaultState": "32767", 62 | "minValue": "", 63 | "maxValue": "" 64 | }, 65 | { 66 | "name": "stick/y", 67 | "layout": "", 68 | "variants": "", 69 | "usage": "", 70 | "alias": "", 71 | "useStateFrom": "", 72 | "offset": 4, 73 | "bit": 0, 74 | "sizeInBits": 8, 75 | "format": "BIT ", 76 | "arraySize": 0, 77 | "usages": [], 78 | "aliases": [], 79 | "parameters": "invert=true,normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5", 80 | "processors": "axisDeadzone", 81 | "displayName": "", 82 | "shortDisplayName": "", 83 | "noisy": false, 84 | "synthetic": false, 85 | "defaultState": "127", 86 | "minValue": "", 87 | "maxValue": "" 88 | }, 89 | { 90 | "name": "stick/up", 91 | "layout": "", 92 | "variants": "", 93 | "usage": "", 94 | "alias": "", 95 | "useStateFrom": "", 96 | "offset": 4294967295, 97 | "bit": 4294967295, 98 | "sizeInBits": 0, 99 | "format": "", 100 | "arraySize": 0, 101 | "usages": [], 102 | "aliases": [], 103 | "parameters": "invert=true,normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=-1,clampMax=0,invert=true", 104 | "processors": "", 105 | "displayName": "", 106 | "shortDisplayName": "", 107 | "noisy": false, 108 | "synthetic": false, 109 | "defaultState": "", 110 | "minValue": "", 111 | "maxValue": "" 112 | }, 113 | { 114 | "name": "stick/down", 115 | "layout": "", 116 | "variants": "", 117 | "usage": "", 118 | "alias": "", 119 | "useStateFrom": "", 120 | "offset": 4294967295, 121 | "bit": 4294967295, 122 | "sizeInBits": 0, 123 | "format": "", 124 | "arraySize": 0, 125 | "usages": [], 126 | "aliases": [], 127 | "parameters": "invert=true,normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=0,clampMax=1,invert=false", 128 | "processors": "", 129 | "displayName": "", 130 | "shortDisplayName": "", 131 | "noisy": false, 132 | "synthetic": false, 133 | "defaultState": "", 134 | "minValue": "", 135 | "maxValue": "" 136 | }, 137 | { 138 | "name": "stick/left", 139 | "layout": "", 140 | "variants": "", 141 | "usage": "", 142 | "alias": "", 143 | "useStateFrom": "", 144 | "offset": 4294967295, 145 | "bit": 4294967295, 146 | "sizeInBits": 0, 147 | "format": "", 148 | "arraySize": 0, 149 | "usages": [], 150 | "aliases": [], 151 | "parameters": "normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=-1,clampMax=0,invert=true", 152 | "processors": "", 153 | "displayName": "", 154 | "shortDisplayName": "", 155 | "noisy": false, 156 | "synthetic": false, 157 | "defaultState": "", 158 | "minValue": "", 159 | "maxValue": "" 160 | }, 161 | { 162 | "name": "stick/right", 163 | "layout": "", 164 | "variants": "", 165 | "usage": "", 166 | "alias": "", 167 | "useStateFrom": "", 168 | "offset": 4294967295, 169 | "bit": 4294967295, 170 | "sizeInBits": 0, 171 | "format": "", 172 | "arraySize": 0, 173 | "usages": [], 174 | "aliases": [], 175 | "parameters": "normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=0,clampMax=1", 176 | "processors": "", 177 | "displayName": "", 178 | "shortDisplayName": "", 179 | "noisy": false, 180 | "synthetic": false, 181 | "defaultState": "", 182 | "minValue": "", 183 | "maxValue": "" 184 | }, 185 | { 186 | "name": "trigger", 187 | "layout": "Button", 188 | "variants": "", 189 | "usage": "", 190 | "alias": "", 191 | "useStateFrom": "", 192 | "offset": 1, 193 | "bit": 4, 194 | "sizeInBits": 1, 195 | "format": "BIT ", 196 | "arraySize": 0, 197 | "usages": [ 198 | "PrimaryTrigger", 199 | "PrimaryAction" 200 | ], 201 | "aliases": [], 202 | "parameters": "", 203 | "processors": "", 204 | "displayName": "Trigger", 205 | "shortDisplayName": "", 206 | "noisy": false, 207 | "synthetic": false, 208 | "defaultState": "", 209 | "minValue": "", 210 | "maxValue": "" 211 | }, 212 | { 213 | "name": "button2", 214 | "layout": "Button", 215 | "variants": "", 216 | "usage": "", 217 | "alias": "", 218 | "useStateFrom": "", 219 | "offset": 1, 220 | "bit": 5, 221 | "sizeInBits": 1, 222 | "format": "BIT ", 223 | "arraySize": 0, 224 | "usages": [ 225 | "SecondaryTrigger", 226 | "SecondaryAction" 227 | ], 228 | "aliases": [], 229 | "parameters": "", 230 | "processors": "", 231 | "displayName": "Button 2", 232 | "shortDisplayName": "", 233 | "noisy": false, 234 | "synthetic": false, 235 | "defaultState": "", 236 | "minValue": "", 237 | "maxValue": "" 238 | }, 239 | { 240 | "name": "button3", 241 | "layout": "Button", 242 | "variants": "", 243 | "usage": "", 244 | "alias": "", 245 | "useStateFrom": "", 246 | "offset": 1, 247 | "bit": 6, 248 | "sizeInBits": 1, 249 | "format": "BIT ", 250 | "arraySize": 0, 251 | "usages": [], 252 | "aliases": [], 253 | "parameters": "", 254 | "processors": "", 255 | "displayName": "Button 3", 256 | "shortDisplayName": "", 257 | "noisy": false, 258 | "synthetic": false, 259 | "defaultState": "", 260 | "minValue": "", 261 | "maxValue": "" 262 | }, 263 | { 264 | "name": "button4", 265 | "layout": "Button", 266 | "variants": "", 267 | "usage": "", 268 | "alias": "", 269 | "useStateFrom": "", 270 | "offset": 1, 271 | "bit": 7, 272 | "sizeInBits": 1, 273 | "format": "BIT ", 274 | "arraySize": 0, 275 | "usages": [], 276 | "aliases": [], 277 | "parameters": "", 278 | "processors": "", 279 | "displayName": "Button 4", 280 | "shortDisplayName": "", 281 | "noisy": false, 282 | "synthetic": false, 283 | "defaultState": "", 284 | "minValue": "", 285 | "maxValue": "" 286 | }, 287 | { 288 | "name": "button5", 289 | "layout": "Button", 290 | "variants": "", 291 | "usage": "", 292 | "alias": "", 293 | "useStateFrom": "", 294 | "offset": 2, 295 | "bit": 0, 296 | "sizeInBits": 1, 297 | "format": "BIT ", 298 | "arraySize": 0, 299 | "usages": [], 300 | "aliases": [], 301 | "parameters": "", 302 | "processors": "", 303 | "displayName": "Button 5", 304 | "shortDisplayName": "", 305 | "noisy": false, 306 | "synthetic": false, 307 | "defaultState": "", 308 | "minValue": "", 309 | "maxValue": "" 310 | }, 311 | { 312 | "name": "button6", 313 | "layout": "Button", 314 | "variants": "", 315 | "usage": "", 316 | "alias": "", 317 | "useStateFrom": "", 318 | "offset": 2, 319 | "bit": 1, 320 | "sizeInBits": 1, 321 | "format": "BIT ", 322 | "arraySize": 0, 323 | "usages": [], 324 | "aliases": [], 325 | "parameters": "", 326 | "processors": "", 327 | "displayName": "Button 6", 328 | "shortDisplayName": "", 329 | "noisy": false, 330 | "synthetic": false, 331 | "defaultState": "", 332 | "minValue": "", 333 | "maxValue": "" 334 | }, 335 | { 336 | "name": "button7", 337 | "layout": "Button", 338 | "variants": "", 339 | "usage": "", 340 | "alias": "", 341 | "useStateFrom": "", 342 | "offset": 2, 343 | "bit": 2, 344 | "sizeInBits": 1, 345 | "format": "BIT ", 346 | "arraySize": 0, 347 | "usages": [], 348 | "aliases": [], 349 | "parameters": "", 350 | "processors": "", 351 | "displayName": "Button 7", 352 | "shortDisplayName": "", 353 | "noisy": false, 354 | "synthetic": false, 355 | "defaultState": "", 356 | "minValue": "", 357 | "maxValue": "" 358 | }, 359 | { 360 | "name": "button8", 361 | "layout": "Button", 362 | "variants": "", 363 | "usage": "", 364 | "alias": "", 365 | "useStateFrom": "", 366 | "offset": 2, 367 | "bit": 3, 368 | "sizeInBits": 1, 369 | "format": "BIT ", 370 | "arraySize": 0, 371 | "usages": [], 372 | "aliases": [], 373 | "parameters": "", 374 | "processors": "", 375 | "displayName": "Button 8", 376 | "shortDisplayName": "", 377 | "noisy": false, 378 | "synthetic": false, 379 | "defaultState": "", 380 | "minValue": "", 381 | "maxValue": "" 382 | }, 383 | { 384 | "name": "button9", 385 | "layout": "Button", 386 | "variants": "", 387 | "usage": "", 388 | "alias": "", 389 | "useStateFrom": "", 390 | "offset": 2, 391 | "bit": 4, 392 | "sizeInBits": 1, 393 | "format": "BIT ", 394 | "arraySize": 0, 395 | "usages": [], 396 | "aliases": [], 397 | "parameters": "", 398 | "processors": "", 399 | "displayName": "Button 9", 400 | "shortDisplayName": "", 401 | "noisy": false, 402 | "synthetic": false, 403 | "defaultState": "", 404 | "minValue": "", 405 | "maxValue": "" 406 | }, 407 | { 408 | "name": "button10", 409 | "layout": "Button", 410 | "variants": "", 411 | "usage": "", 412 | "alias": "", 413 | "useStateFrom": "", 414 | "offset": 2, 415 | "bit": 5, 416 | "sizeInBits": 1, 417 | "format": "BIT ", 418 | "arraySize": 0, 419 | "usages": [], 420 | "aliases": [], 421 | "parameters": "", 422 | "processors": "", 423 | "displayName": "Button 10", 424 | "shortDisplayName": "", 425 | "noisy": false, 426 | "synthetic": false, 427 | "defaultState": "", 428 | "minValue": "", 429 | "maxValue": "" 430 | }, 431 | { 432 | "name": "button11", 433 | "layout": "Button", 434 | "variants": "", 435 | "usage": "", 436 | "alias": "", 437 | "useStateFrom": "", 438 | "offset": 2, 439 | "bit": 6, 440 | "sizeInBits": 1, 441 | "format": "BIT ", 442 | "arraySize": 0, 443 | "usages": [], 444 | "aliases": [], 445 | "parameters": "", 446 | "processors": "", 447 | "displayName": "Button 11", 448 | "shortDisplayName": "", 449 | "noisy": false, 450 | "synthetic": false, 451 | "defaultState": "", 452 | "minValue": "", 453 | "maxValue": "" 454 | }, 455 | { 456 | "name": "button12", 457 | "layout": "Button", 458 | "variants": "", 459 | "usage": "", 460 | "alias": "", 461 | "useStateFrom": "", 462 | "offset": 2, 463 | "bit": 7, 464 | "sizeInBits": 1, 465 | "format": "BIT ", 466 | "arraySize": 0, 467 | "usages": [], 468 | "aliases": [], 469 | "parameters": "", 470 | "processors": "", 471 | "displayName": "Button 12", 472 | "shortDisplayName": "", 473 | "noisy": false, 474 | "synthetic": false, 475 | "defaultState": "", 476 | "minValue": "", 477 | "maxValue": "" 478 | }, 479 | { 480 | "name": "button13", 481 | "layout": "Button", 482 | "variants": "", 483 | "usage": "", 484 | "alias": "", 485 | "useStateFrom": "", 486 | "offset": 3, 487 | "bit": 0, 488 | "sizeInBits": 1, 489 | "format": "BIT ", 490 | "arraySize": 0, 491 | "usages": [], 492 | "aliases": [], 493 | "parameters": "", 494 | "processors": "", 495 | "displayName": "Button 13", 496 | "shortDisplayName": "", 497 | "noisy": false, 498 | "synthetic": false, 499 | "defaultState": "", 500 | "minValue": "", 501 | "maxValue": "" 502 | }, 503 | { 504 | "name": "button14", 505 | "layout": "Button", 506 | "variants": "", 507 | "usage": "", 508 | "alias": "", 509 | "useStateFrom": "", 510 | "offset": 3, 511 | "bit": 1, 512 | "sizeInBits": 1, 513 | "format": "BIT ", 514 | "arraySize": 0, 515 | "usages": [], 516 | "aliases": [], 517 | "parameters": "", 518 | "processors": "", 519 | "displayName": "Button 14", 520 | "shortDisplayName": "", 521 | "noisy": false, 522 | "synthetic": false, 523 | "defaultState": "", 524 | "minValue": "", 525 | "maxValue": "" 526 | }, 527 | { 528 | "name": "button15", 529 | "layout": "Button", 530 | "variants": "", 531 | "usage": "", 532 | "alias": "", 533 | "useStateFrom": "", 534 | "offset": 3, 535 | "bit": 2, 536 | "sizeInBits": 1, 537 | "format": "BIT ", 538 | "arraySize": 0, 539 | "usages": [], 540 | "aliases": [], 541 | "parameters": "", 542 | "processors": "", 543 | "displayName": "Button 15", 544 | "shortDisplayName": "", 545 | "noisy": false, 546 | "synthetic": false, 547 | "defaultState": "", 548 | "minValue": "", 549 | "maxValue": "" 550 | }, 551 | { 552 | "name": "button16", 553 | "layout": "Button", 554 | "variants": "", 555 | "usage": "", 556 | "alias": "", 557 | "useStateFrom": "", 558 | "offset": 3, 559 | "bit": 3, 560 | "sizeInBits": 1, 561 | "format": "BIT ", 562 | "arraySize": 0, 563 | "usages": [], 564 | "aliases": [], 565 | "parameters": "", 566 | "processors": "", 567 | "displayName": "Button 16", 568 | "shortDisplayName": "", 569 | "noisy": false, 570 | "synthetic": false, 571 | "defaultState": "", 572 | "minValue": "", 573 | "maxValue": "" 574 | }, 575 | { 576 | "name": "button17", 577 | "layout": "Button", 578 | "variants": "", 579 | "usage": "", 580 | "alias": "", 581 | "useStateFrom": "", 582 | "offset": 3, 583 | "bit": 4, 584 | "sizeInBits": 1, 585 | "format": "BIT ", 586 | "arraySize": 0, 587 | "usages": [], 588 | "aliases": [], 589 | "parameters": "", 590 | "processors": "", 591 | "displayName": "Button 17", 592 | "shortDisplayName": "", 593 | "noisy": false, 594 | "synthetic": false, 595 | "defaultState": "", 596 | "minValue": "", 597 | "maxValue": "" 598 | }, 599 | { 600 | "name": "button18", 601 | "layout": "Button", 602 | "variants": "", 603 | "usage": "", 604 | "alias": "", 605 | "useStateFrom": "", 606 | "offset": 3, 607 | "bit": 5, 608 | "sizeInBits": 1, 609 | "format": "BIT ", 610 | "arraySize": 0, 611 | "usages": [], 612 | "aliases": [], 613 | "parameters": "", 614 | "processors": "", 615 | "displayName": "Button 18", 616 | "shortDisplayName": "", 617 | "noisy": false, 618 | "synthetic": false, 619 | "defaultState": "", 620 | "minValue": "", 621 | "maxValue": "" 622 | }, 623 | { 624 | "name": "button19", 625 | "layout": "Button", 626 | "variants": "", 627 | "usage": "", 628 | "alias": "", 629 | "useStateFrom": "", 630 | "offset": 3, 631 | "bit": 6, 632 | "sizeInBits": 1, 633 | "format": "BIT ", 634 | "arraySize": 0, 635 | "usages": [], 636 | "aliases": [], 637 | "parameters": "", 638 | "processors": "", 639 | "displayName": "Button 19", 640 | "shortDisplayName": "", 641 | "noisy": false, 642 | "synthetic": false, 643 | "defaultState": "", 644 | "minValue": "", 645 | "maxValue": "" 646 | }, 647 | { 648 | "name": "button20", 649 | "layout": "Button", 650 | "variants": "", 651 | "usage": "", 652 | "alias": "", 653 | "useStateFrom": "", 654 | "offset": 3, 655 | "bit": 7, 656 | "sizeInBits": 1, 657 | "format": "BIT ", 658 | "arraySize": 0, 659 | "usages": [], 660 | "aliases": [], 661 | "parameters": "", 662 | "processors": "", 663 | "displayName": "Button 20", 664 | "shortDisplayName": "", 665 | "noisy": false, 666 | "synthetic": false, 667 | "defaultState": "", 668 | "minValue": "", 669 | "maxValue": "" 670 | }, 671 | { 672 | "name": "button21", 673 | "layout": "Button", 674 | "variants": "", 675 | "usage": "", 676 | "alias": "", 677 | "useStateFrom": "", 678 | "offset": 4, 679 | "bit": 0, 680 | "sizeInBits": 1, 681 | "format": "BIT ", 682 | "arraySize": 0, 683 | "usages": [], 684 | "aliases": [], 685 | "parameters": "", 686 | "processors": "", 687 | "displayName": "Button 21", 688 | "shortDisplayName": "", 689 | "noisy": false, 690 | "synthetic": false, 691 | "defaultState": "", 692 | "minValue": "", 693 | "maxValue": "" 694 | }, 695 | { 696 | "name": "button22", 697 | "layout": "Button", 698 | "variants": "", 699 | "usage": "", 700 | "alias": "", 701 | "useStateFrom": "", 702 | "offset": 4, 703 | "bit": 1, 704 | "sizeInBits": 1, 705 | "format": "BIT ", 706 | "arraySize": 0, 707 | "usages": [], 708 | "aliases": [], 709 | "parameters": "", 710 | "processors": "", 711 | "displayName": "Button 22", 712 | "shortDisplayName": "", 713 | "noisy": false, 714 | "synthetic": false, 715 | "defaultState": "", 716 | "minValue": "", 717 | "maxValue": "" 718 | }, 719 | { 720 | "name": "button23", 721 | "layout": "Button", 722 | "variants": "", 723 | "usage": "", 724 | "alias": "", 725 | "useStateFrom": "", 726 | "offset": 4, 727 | "bit": 2, 728 | "sizeInBits": 1, 729 | "format": "BIT ", 730 | "arraySize": 0, 731 | "usages": [], 732 | "aliases": [], 733 | "parameters": "", 734 | "processors": "", 735 | "displayName": "Button 23", 736 | "shortDisplayName": "", 737 | "noisy": false, 738 | "synthetic": false, 739 | "defaultState": "", 740 | "minValue": "", 741 | "maxValue": "" 742 | }, 743 | { 744 | "name": "button24", 745 | "layout": "Button", 746 | "variants": "", 747 | "usage": "", 748 | "alias": "", 749 | "useStateFrom": "", 750 | "offset": 4, 751 | "bit": 3, 752 | "sizeInBits": 1, 753 | "format": "BIT ", 754 | "arraySize": 0, 755 | "usages": [], 756 | "aliases": [], 757 | "parameters": "", 758 | "processors": "", 759 | "displayName": "Button 24", 760 | "shortDisplayName": "", 761 | "noisy": false, 762 | "synthetic": false, 763 | "defaultState": "", 764 | "minValue": "", 765 | "maxValue": "" 766 | }, 767 | { 768 | "name": "button25", 769 | "layout": "Button", 770 | "variants": "", 771 | "usage": "", 772 | "alias": "", 773 | "useStateFrom": "", 774 | "offset": 4, 775 | "bit": 4, 776 | "sizeInBits": 1, 777 | "format": "BIT ", 778 | "arraySize": 0, 779 | "usages": [], 780 | "aliases": [], 781 | "parameters": "", 782 | "processors": "", 783 | "displayName": "Button 25", 784 | "shortDisplayName": "", 785 | "noisy": false, 786 | "synthetic": false, 787 | "defaultState": "", 788 | "minValue": "", 789 | "maxValue": "" 790 | }, 791 | { 792 | "name": "hat", 793 | "layout": "Dpad", 794 | "variants": "", 795 | "usage": "", 796 | "alias": "", 797 | "useStateFrom": "", 798 | "offset": 1, 799 | "bit": 0, 800 | "sizeInBits": 4, 801 | "format": "BIT ", 802 | "arraySize": 0, 803 | "usages": [], 804 | "aliases": [], 805 | "parameters": "", 806 | "processors": "", 807 | "displayName": "HatSwitch", 808 | "shortDisplayName": "", 809 | "noisy": false, 810 | "synthetic": false, 811 | "defaultState": "8", 812 | "minValue": "", 813 | "maxValue": "" 814 | }, 815 | { 816 | "name": "hat/up", 817 | "layout": "DiscreteButton", 818 | "variants": "", 819 | "usage": "", 820 | "alias": "", 821 | "useStateFrom": "", 822 | "offset": 4294967295, 823 | "bit": 0, 824 | "sizeInBits": 4, 825 | "format": "BIT ", 826 | "arraySize": 0, 827 | "usages": [], 828 | "aliases": [], 829 | "parameters": "minValue=7,maxValue=1,nullValue=8,wrapAtValue=7", 830 | "processors": "", 831 | "displayName": "", 832 | "shortDisplayName": "", 833 | "noisy": false, 834 | "synthetic": false, 835 | "defaultState": "", 836 | "minValue": "", 837 | "maxValue": "" 838 | }, 839 | { 840 | "name": "hat/right", 841 | "layout": "DiscreteButton", 842 | "variants": "", 843 | "usage": "", 844 | "alias": "", 845 | "useStateFrom": "", 846 | "offset": 4294967295, 847 | "bit": 0, 848 | "sizeInBits": 4, 849 | "format": "BIT ", 850 | "arraySize": 0, 851 | "usages": [], 852 | "aliases": [], 853 | "parameters": "minValue=1,maxValue=3", 854 | "processors": "", 855 | "displayName": "", 856 | "shortDisplayName": "", 857 | "noisy": false, 858 | "synthetic": false, 859 | "defaultState": "", 860 | "minValue": "", 861 | "maxValue": "" 862 | }, 863 | { 864 | "name": "hat/down", 865 | "layout": "DiscreteButton", 866 | "variants": "", 867 | "usage": "", 868 | "alias": "", 869 | "useStateFrom": "", 870 | "offset": 4294967295, 871 | "bit": 0, 872 | "sizeInBits": 4, 873 | "format": "BIT ", 874 | "arraySize": 0, 875 | "usages": [], 876 | "aliases": [], 877 | "parameters": "minValue=3,maxValue=5", 878 | "processors": "", 879 | "displayName": "", 880 | "shortDisplayName": "", 881 | "noisy": false, 882 | "synthetic": false, 883 | "defaultState": "", 884 | "minValue": "", 885 | "maxValue": "" 886 | }, 887 | { 888 | "name": "hat/left", 889 | "layout": "DiscreteButton", 890 | "variants": "", 891 | "usage": "", 892 | "alias": "", 893 | "useStateFrom": "", 894 | "offset": 4294967295, 895 | "bit": 0, 896 | "sizeInBits": 4, 897 | "format": "BIT ", 898 | "arraySize": 0, 899 | "usages": [], 900 | "aliases": [], 901 | "parameters": "minValue=5,maxValue=7", 902 | "processors": "", 903 | "displayName": "", 904 | "shortDisplayName": "", 905 | "noisy": false, 906 | "synthetic": false, 907 | "defaultState": "", 908 | "minValue": "", 909 | "maxValue": "" 910 | }, 911 | { 912 | "name": "rz", 913 | "layout": "Axis", 914 | "variants": "", 915 | "usage": "", 916 | "alias": "", 917 | "useStateFrom": "", 918 | "offset": 8, 919 | "bit": 0, 920 | "sizeInBits": 8, 921 | "format": "BYTE", 922 | "arraySize": 0, 923 | "usages": [ 924 | "Twist" 925 | ], 926 | "aliases": [], 927 | "parameters": "normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5", 928 | "processors": "axisDeadzone", 929 | "displayName": "Rz", 930 | "shortDisplayName": "", 931 | "noisy": false, 932 | "synthetic": false, 933 | "defaultState": "127", 934 | "minValue": "", 935 | "maxValue": "" 936 | }, 937 | { 938 | "name": "z", 939 | "layout": "Axis", 940 | "variants": "", 941 | "usage": "", 942 | "alias": "", 943 | "useStateFrom": "", 944 | "offset": 7, 945 | "bit": 0, 946 | "sizeInBits": 8, 947 | "format": "BYTE", 948 | "arraySize": 0, 949 | "usages": [], 950 | "aliases": [], 951 | "parameters": "normalize=true,normalizeMin=0,normalizeMax=1,normalizeZero=0.5", 952 | "processors": "axisDeadzone", 953 | "displayName": "Z", 954 | "shortDisplayName": "", 955 | "noisy": false, 956 | "synthetic": false, 957 | "defaultState": "127", 958 | "minValue": "", 959 | "maxValue": "" 960 | } 961 | ] 962 | } -------------------------------------------------------------------------------- /Samples/G29.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbd07bbf92bd8a14bbdfc30518e70bc0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/InputterSample_Scene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &90027735 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 90027738} 135 | - component: {fileID: 90027739} 136 | m_Layer: 0 137 | m_Name: Inputter Viewer 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!4 &90027738 144 | Transform: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 90027735} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: 0, y: 0, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_ConstrainProportionsScale: 0 154 | m_Children: [] 155 | m_Father: {fileID: 0} 156 | m_RootOrder: 0 157 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 158 | --- !u!114 &90027739 159 | MonoBehaviour: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 90027735} 165 | m_Enabled: 1 166 | m_EditorHideFlags: 0 167 | m_Script: {fileID: 11500000, guid: d04479ddb3e648f41a1f910c898e6034, type: 3} 168 | m_Name: 169 | m_EditorClassIdentifier: 170 | m_InputActionAsset: {fileID: -944628639613478452, guid: 5064152a25ef0aa4988b8ab6cbf3e3b9, 171 | type: 3} 172 | -------------------------------------------------------------------------------- /Samples/InputterSample_Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69caee32486e8314b92194f75314e705 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/InputterTester.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.InputSystem; 3 | using UnityEngine.Assertions; 4 | 5 | #if UNITY_EDITOR 6 | using UnityEditor; 7 | #endif 8 | 9 | namespace Inputter.Samples 10 | { 11 | [AddComponentMenu("Inputter/Samples/Inputter Tester"), DisallowMultipleComponent] 12 | public class InputterTester : MonoBehaviour 13 | { 14 | [SerializeField] private InputActionAsset m_InputActionAsset = null; 15 | 16 | public float Steering { get; private set; } 17 | public float Throttle { get; private set; } 18 | public float Brake { get; private set; } 19 | public float Clutch { get; private set; } 20 | public float Handbrake { get; private set; } 21 | public bool GearUp { get; private set; } 22 | public bool GearDown { get; private set; } 23 | public Vector2 Dpad { get; private set; } 24 | 25 | private PlayerInput input; 26 | private Vector3 angles; 27 | 28 | private void Awake() 29 | { 30 | input = gameObject.AddComponent(); 31 | input.hideFlags = HideFlags.NotEditable; 32 | 33 | input.actions = m_InputActionAsset; 34 | input.actions.Enable(); 35 | 36 | hideFlags = HideFlags.NotEditable; 37 | } 38 | 39 | private void OnEnable() => input.ActivateInput(); 40 | 41 | private void OnDisable() => input.DeactivateInput(); 42 | 43 | private LogitechGSDK.LogiControllerPropertiesData data; 44 | 45 | private void Start() 46 | { 47 | Assert.IsNotNull(LogitechG29.current, "LogitechG29 is not supposed to be null!"); 48 | 49 | Debug.Log($"GetControllerProperties={LogitechG29.current.GetControllerProperties(ref data)}"); 50 | print($"GETTER\n{data}"); 51 | 52 | data.wheelRange = 0; 53 | data.forceEnable = false; 54 | Debug.Log($"SetControllerProperties={LogitechG29.current.SetControllerProperties(data)}"); 55 | 56 | Debug.Log($"GetControllerProperties={LogitechG29.current.GetControllerProperties(ref data)}"); 57 | print($"SETTER\n{data}"); 58 | } 59 | 60 | private void Update() 61 | { 62 | Assert.IsNotNull(LogitechG29.current, "LogitechG29 is not supposed to be null!"); 63 | 64 | if (LogitechG29.current == null) 65 | return; 66 | 67 | Steering = input.actions["Steering"].ReadValue(); 68 | Throttle = input.actions["Throttle"].ReadValue(); 69 | Brake = input.actions["Brake"].ReadValue(); 70 | Clutch = input.actions["Clutch"].ReadValue(); 71 | Handbrake = input.actions["Handbrake"].ReadValue(); 72 | GearUp = input.actions["Gear up"].WasPerformedThisFrame(); 73 | GearDown = input.actions["Gear Down"].WasPerformedThisFrame(); 74 | 75 | angles.Set((Throttle - Brake) * 45f, Steering * 450f, Clutch * 45f); // Use .Set method instead making new Vector3 struct every single frame. Not much performance benefits, but nonetheless performance overall! 76 | 77 | transform.localEulerAngles = angles; 78 | 79 | if (Keyboard.current != null) 80 | { 81 | if (Keyboard.current[Key.A].wasPressedThisFrame) 82 | { 83 | if (LogitechG29.current.IsPlayingCarAirborne) 84 | LogitechG29.current.PlayCarAirborne(); 85 | else 86 | LogitechG29.current.StopCarAirborne(); 87 | } 88 | 89 | if (Keyboard.current[Key.C].wasPressedThisFrame) 90 | { 91 | if (LogitechG29.current.IsPlayingConstantForce) 92 | LogitechG29.current.PlayConstantForce(magnitude: 50); 93 | else 94 | LogitechG29.current.StopConstantForce(); 95 | } 96 | 97 | if (Keyboard.current[Key.S].wasPressedThisFrame) 98 | { 99 | if (LogitechG29.current.IsPlayingSpringForce) 100 | LogitechG29.current.PlaySpringForce(offset: 0, 101 | saturation: 100, coefficient: 50); 102 | else 103 | LogitechG29.current.StopSpringForce(); 104 | } 105 | 106 | if (Keyboard.current[Key.D].wasPressedThisFrame) 107 | { 108 | if (LogitechG29.current.IsPlayingDamperForce) 109 | LogitechG29.current.PlayDamperForce(coefficient: 50); 110 | else 111 | LogitechG29.current.StopDamperForce(); 112 | } 113 | 114 | if (Keyboard.current[Key.F].wasPressedThisFrame) 115 | { 116 | if (LogitechG29.current.IsPlayingSlippyRoadEffect) 117 | LogitechG29.current.PlaySoftstopForce(usableRange: 50); 118 | else 119 | LogitechG29.current.StopSoftstopForce(); 120 | } 121 | 122 | if (Keyboard.current[Key.Q].wasPressedThisFrame) 123 | { 124 | if (LogitechG29.current.IsPlayingBumpyRoadEffect) 125 | LogitechG29.current.PlayBumpyRoadEffect(magnitude: 50); 126 | else 127 | LogitechG29.current.StopBumpyRoadEffect(); 128 | } 129 | 130 | if (Keyboard.current[Key.W].wasPressedThisFrame) 131 | { 132 | if (LogitechG29.current.IsPlayingDirtRoadEffect) 133 | LogitechG29.current.PlayDirtRoadEffect(magnitude: 50); 134 | else 135 | LogitechG29.current.StopDirtRoadEffect(); 136 | } 137 | 138 | if (Keyboard.current[Key.E].wasPressedThisFrame) 139 | { 140 | if (LogitechG29.current.IsPlayingSlippyRoadEffect) 141 | LogitechG29.current.PlaySlipperyRoadEffect(magnitude: 50); 142 | else 143 | LogitechG29.current.StopSlipperyRoadEffect(); 144 | } 145 | 146 | if (Keyboard.current[Key.P].wasPressedThisFrame) 147 | LogitechG29.current.PlaySideCollisionForce(magnitude: 50); 148 | 149 | if (Keyboard.current[Key.O].wasPressedThisFrame) 150 | LogitechG29.current.PlayFontalCollisionForce(magnitude: 50); 151 | } 152 | 153 | const float MIN_RPM = 0f; 154 | const float MAX_RPM = 15000f; 155 | 156 | LogitechG29.current.PlayLeds(Throttle * MAX_RPM, MIN_RPM, MAX_RPM); 157 | 158 | if (LogitechG29.current[LogitechG29.G29Button.Plus].wasReleasedThisFrame) 159 | Debug.Log("Plus!"); 160 | 161 | if (LogitechG29.current[LogitechG29.G29Button.LeftStick].wasReleasedThisFrame) 162 | Debug.Log("LeftStick!"); 163 | 164 | if (LogitechG29.current[LogitechG29.G29Button.RightSpin].wasReleasedThisFrame) 165 | Debug.Log("RightSpin!"); 166 | 167 | if (LogitechG29.current[LogitechG29.G29Button.EnterSpin].wasReleasedThisFrame) 168 | Debug.Log("EnterSpin!"); 169 | 170 | if (LogitechG29.current[LogitechG29.G29Button.Options].wasReleasedThisFrame) 171 | Debug.Log("Options!"); 172 | 173 | if (LogitechG29.current[LogitechG29.G29Button.RightBumper] 174 | .wasReleasedThisFrame) 175 | Debug.Log("RightBumper!"); 176 | 177 | if (LogitechG29.current[LogitechG29.G29Button.North].wasReleasedThisFrame) 178 | Debug.Log("North!"); 179 | 180 | if (LogitechG29.current[LogitechG29.G29Button.East].wasReleasedThisFrame) 181 | Debug.Log("East!"); 182 | 183 | if (LogitechG29.current[LogitechG29.G29Button.West].wasReleasedThisFrame) 184 | Debug.Log("West!"); 185 | 186 | if (LogitechG29.current[LogitechG29.G29Button.South].wasReleasedThisFrame) 187 | Debug.Log("South!"); 188 | 189 | Dpad = LogitechG29.current.hatSwitch.ReadValue(); 190 | } 191 | } 192 | 193 | #if UNITY_EDITOR 194 | [CustomEditor(typeof(InputterTester))] 195 | public class InputterTesterEditor : UnityEditor.Editor 196 | { 197 | public override bool RequiresConstantRepaint() => true; 198 | 199 | public override void OnInspectorGUI() 200 | { 201 | var data = (InputterTester)target; 202 | 203 | var label = new GUIStyle(EditorStyles.label) 204 | { 205 | wordWrap = true, 206 | }; 207 | 208 | EditorGUI.BeginDisabledGroup(disabled: true); 209 | 210 | EditorGUILayout.BeginVertical(EditorStyles.helpBox); 211 | 212 | EditorGUILayout.LabelField("A [Keyboard] = CarAirborne (Effect)", label); 213 | EditorGUILayout.LabelField("S [Keyboard] = SpringForce (Effect)", label); 214 | EditorGUILayout.LabelField("D [Keyboard] = DamperForce (Effect)", label); 215 | 216 | EditorGUILayout.LabelField("C [Keyboard] = ConstantForce (Effect)", label); 217 | 218 | EditorGUILayout.LabelField("F [Keyboard] = SoftstopForce (Effect)", label); 219 | 220 | EditorGUILayout.LabelField("P [Keyboard] = SideCollisionForce (Effect)", label); 221 | 222 | EditorGUILayout.LabelField("O [Keyboard] = FontalCollisionForce (Effect)", label); 223 | 224 | EditorGUILayout.LabelField("Q [Keyboard] = BumpyRoadEffect (Effect)", label); 225 | 226 | EditorGUILayout.LabelField("W [Keyboard] = DirtRoadEffect (Effect)", label); 227 | 228 | EditorGUILayout.LabelField("E [Keyboard] = SlipperyRoadEffect (Effect)", label); 229 | 230 | EditorGUILayout.EndVertical(); 231 | 232 | EditorGUILayout.Space(); 233 | 234 | EditorGUILayout.Slider("Steering", data.Steering, 235 | leftValue: -1f, rightValue: 1f); 236 | 237 | EditorGUILayout.Slider("Throttle", data.Throttle, 238 | leftValue: 0f, rightValue: 1f); 239 | 240 | EditorGUILayout.Slider("Brake", data.Brake, 241 | leftValue: 0f, rightValue: 1f); 242 | 243 | EditorGUILayout.Slider("Clutch", data.Clutch, 244 | leftValue: 0f, rightValue: 1f); 245 | 246 | EditorGUILayout.Slider("Handbrake", data.Handbrake, 247 | leftValue: 0f, rightValue: 1f); 248 | 249 | EditorGUILayout.Toggle($"Gear Up", data.GearUp); 250 | EditorGUILayout.Toggle($"Gear Down", data.GearDown); 251 | EditorGUILayout.Vector2Field($"Dpad", data.Dpad); 252 | 253 | EditorGUI.EndDisabledGroup(); 254 | EditorGUILayout.Space(); 255 | 256 | base.OnInspectorGUI(); 257 | } 258 | } 259 | #endif 260 | } 261 | -------------------------------------------------------------------------------- /Samples/InputterTester.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d04479ddb3e648f41a1f910c898e6034 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - m_InputActionAsset: {fileID: -944628639613478452, guid: 5064152a25ef0aa4988b8ab6cbf3e3b9, 8 | type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Samples/uInputter_VehicleControls.inputactions: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uInputter_VehicleControls", 3 | "maps": [ 4 | { 5 | "name": "Car", 6 | "id": "cab8cc1c-7a5b-4961-b9a4-819c3c59a052", 7 | "actions": [ 8 | { 9 | "name": "Steering", 10 | "type": "PassThrough", 11 | "id": "e12728df-71dc-4aab-9ff9-0c196104bcc2", 12 | "expectedControlType": "Axis", 13 | "processors": "", 14 | "interactions": "", 15 | "initialStateCheck": false 16 | }, 17 | { 18 | "name": "Throttle", 19 | "type": "PassThrough", 20 | "id": "4cf9542c-0068-4999-b449-ec5fd7a52dee", 21 | "expectedControlType": "Axis", 22 | "processors": "", 23 | "interactions": "", 24 | "initialStateCheck": false 25 | }, 26 | { 27 | "name": "Brake", 28 | "type": "PassThrough", 29 | "id": "925d7cd7-9132-45a7-a347-26d26cbd3791", 30 | "expectedControlType": "Axis", 31 | "processors": "", 32 | "interactions": "", 33 | "initialStateCheck": false 34 | }, 35 | { 36 | "name": "Clutch", 37 | "type": "PassThrough", 38 | "id": "93bfd12e-4be3-458e-bf9f-658324f81f85", 39 | "expectedControlType": "Axis", 40 | "processors": "", 41 | "interactions": "", 42 | "initialStateCheck": false 43 | }, 44 | { 45 | "name": "Handbrake", 46 | "type": "PassThrough", 47 | "id": "5dc57075-6792-4a0b-8de3-8e9ae8a72805", 48 | "expectedControlType": "Axis", 49 | "processors": "", 50 | "interactions": "", 51 | "initialStateCheck": false 52 | }, 53 | { 54 | "name": "Gear Up", 55 | "type": "Button", 56 | "id": "b824b790-2bf1-4bf5-914b-b312218cbc0e", 57 | "expectedControlType": "Button", 58 | "processors": "", 59 | "interactions": "Press(behavior=1)", 60 | "initialStateCheck": false 61 | }, 62 | { 63 | "name": "Gear Down", 64 | "type": "Button", 65 | "id": "09d8d063-e267-4ec6-8400-7c157714f644", 66 | "expectedControlType": "Button", 67 | "processors": "", 68 | "interactions": "Press(behavior=1)", 69 | "initialStateCheck": false 70 | }, 71 | { 72 | "name": "Startup", 73 | "type": "PassThrough", 74 | "id": "6f7ff5fa-593a-4953-8f42-a0df0299db06", 75 | "expectedControlType": "Button", 76 | "processors": "", 77 | "interactions": "Hold", 78 | "initialStateCheck": false 79 | }, 80 | { 81 | "name": "Test", 82 | "type": "Button", 83 | "id": "4bc17b9a-b3ab-469f-8bae-710816cc1b2c", 84 | "expectedControlType": "Button", 85 | "processors": "", 86 | "interactions": "Press(behavior=1)", 87 | "initialStateCheck": false 88 | } 89 | ], 90 | "bindings": [ 91 | { 92 | "name": "", 93 | "id": "b8feb6ea-1106-4e19-af88-a16fa0d4de28", 94 | "path": "/s", 95 | "interactions": "", 96 | "processors": "Extension(sensitivitySpeed=1,gravitySpeed=5)", 97 | "groups": "Mouse&Keyboard", 98 | "action": "Brake", 99 | "isComposite": false, 100 | "isPartOfComposite": false 101 | }, 102 | { 103 | "name": "", 104 | "id": "a2bcc43a-dd16-4c1d-a7d1-3c5f5d37fd2d", 105 | "path": "/brakeAxis", 106 | "interactions": "", 107 | "processors": "", 108 | "groups": "Joystick", 109 | "action": "Brake", 110 | "isComposite": false, 111 | "isPartOfComposite": false 112 | }, 113 | { 114 | "name": "", 115 | "id": "ec73f4f8-2ed8-4aed-9246-fabc27c1b5c4", 116 | "path": "/space", 117 | "interactions": "", 118 | "processors": "Extension(sensitivitySpeed=5,gravitySpeed=5)", 119 | "groups": "Mouse&Keyboard", 120 | "action": "Handbrake", 121 | "isComposite": false, 122 | "isPartOfComposite": false 123 | }, 124 | { 125 | "name": "", 126 | "id": "3abd3d78-8d94-4a94-8ff5-b22c20e8f88c", 127 | "path": "/southButton", 128 | "interactions": "", 129 | "processors": "", 130 | "groups": "Joystick", 131 | "action": "Handbrake", 132 | "isComposite": false, 133 | "isPartOfComposite": false 134 | }, 135 | { 136 | "name": "", 137 | "id": "5807112f-395e-420c-b214-3a323076290e", 138 | "path": "/e", 139 | "interactions": "", 140 | "processors": "", 141 | "groups": "Mouse&Keyboard", 142 | "action": "Gear Up", 143 | "isComposite": false, 144 | "isPartOfComposite": false 145 | }, 146 | { 147 | "name": "", 148 | "id": "821beae4-c444-4b52-9461-9ab39da9220d", 149 | "path": "/rightShiftButton", 150 | "interactions": "", 151 | "processors": "", 152 | "groups": "Joystick", 153 | "action": "Gear Up", 154 | "isComposite": false, 155 | "isPartOfComposite": false 156 | }, 157 | { 158 | "name": "", 159 | "id": "e46295d7-6d1c-46b5-b68f-fed51369fed0", 160 | "path": "/q", 161 | "interactions": "", 162 | "processors": "", 163 | "groups": "Mouse&Keyboard", 164 | "action": "Gear Down", 165 | "isComposite": false, 166 | "isPartOfComposite": false 167 | }, 168 | { 169 | "name": "", 170 | "id": "c7364a20-5c89-4e8a-b6b4-13a596ee3369", 171 | "path": "/leftShiftButton", 172 | "interactions": "", 173 | "processors": "", 174 | "groups": "Joystick", 175 | "action": "Gear Down", 176 | "isComposite": false, 177 | "isPartOfComposite": false 178 | }, 179 | { 180 | "name": "", 181 | "id": "e02fb2ba-a6f9-49f4-a1e1-ab977ac70294", 182 | "path": "/stick/x", 183 | "interactions": "", 184 | "processors": "", 185 | "groups": "Joystick", 186 | "action": "Steering", 187 | "isComposite": false, 188 | "isPartOfComposite": false 189 | }, 190 | { 191 | "name": "Keys", 192 | "id": "3166aa88-8fff-4ddb-a359-efe1423d4532", 193 | "path": "1DAxis", 194 | "interactions": "", 195 | "processors": "Extension(sensitivitySpeed=1.5,gravitySpeed=5)", 196 | "groups": "", 197 | "action": "Steering", 198 | "isComposite": true, 199 | "isPartOfComposite": false 200 | }, 201 | { 202 | "name": "negative", 203 | "id": "4ea226aa-f4b4-4b71-bbbd-2c79b10f0fe8", 204 | "path": "/a", 205 | "interactions": "", 206 | "processors": "", 207 | "groups": "Mouse&Keyboard", 208 | "action": "Steering", 209 | "isComposite": false, 210 | "isPartOfComposite": true 211 | }, 212 | { 213 | "name": "positive", 214 | "id": "5d5778a1-4e11-48b3-92e7-1d1ade3771c8", 215 | "path": "/d", 216 | "interactions": "", 217 | "processors": "", 218 | "groups": "Mouse&Keyboard", 219 | "action": "Steering", 220 | "isComposite": false, 221 | "isPartOfComposite": true 222 | }, 223 | { 224 | "name": "", 225 | "id": "d82268f6-ea0a-4b52-9efc-d979314cb6ce", 226 | "path": "/clutchAxis", 227 | "interactions": "", 228 | "processors": "", 229 | "groups": "Joystick", 230 | "action": "Clutch", 231 | "isComposite": false, 232 | "isPartOfComposite": false 233 | }, 234 | { 235 | "name": "", 236 | "id": "bac623d7-5a26-4ed9-bfbd-696c5bd934ee", 237 | "path": "/leftShift", 238 | "interactions": "", 239 | "processors": "Extension(sensitivitySpeed=1,gravitySpeed=1)", 240 | "groups": "Mouse&Keyboard", 241 | "action": "Clutch", 242 | "isComposite": false, 243 | "isPartOfComposite": false 244 | }, 245 | { 246 | "name": "", 247 | "id": "5bdef96e-b25f-42a4-9c4b-f065f62bc9ab", 248 | "path": "/t", 249 | "interactions": "", 250 | "processors": "", 251 | "groups": "Mouse&Keyboard", 252 | "action": "Startup", 253 | "isComposite": false, 254 | "isPartOfComposite": false 255 | }, 256 | { 257 | "name": "", 258 | "id": "48d4ecbc-c328-4610-87fa-bf619cfd4223", 259 | "path": "/returnButton", 260 | "interactions": "", 261 | "processors": "", 262 | "groups": "Joystick", 263 | "action": "Startup", 264 | "isComposite": false, 265 | "isPartOfComposite": false 266 | }, 267 | { 268 | "name": "", 269 | "id": "14bbbf46-8844-438b-9ccd-763cf52f3b84", 270 | "path": "/optionsButton", 271 | "interactions": "", 272 | "processors": "", 273 | "groups": "Joystick", 274 | "action": "Test", 275 | "isComposite": false, 276 | "isPartOfComposite": false 277 | }, 278 | { 279 | "name": "", 280 | "id": "3dad97d4-81e3-43ab-a085-0f821bf6dba3", 281 | "path": "/w", 282 | "interactions": "", 283 | "processors": "Extension(sensitivitySpeed=1,gravitySpeed=5)", 284 | "groups": "Mouse&Keyboard", 285 | "action": "Throttle", 286 | "isComposite": false, 287 | "isPartOfComposite": false 288 | }, 289 | { 290 | "name": "", 291 | "id": "2932d752-5bff-483d-a3aa-c77591eeb1ad", 292 | "path": "/throttleAxis", 293 | "interactions": "", 294 | "processors": "", 295 | "groups": "Joystick", 296 | "action": "Throttle", 297 | "isComposite": false, 298 | "isPartOfComposite": false 299 | } 300 | ] 301 | } 302 | ], 303 | "controlSchemes": [ 304 | { 305 | "name": "Mouse&Keyboard", 306 | "bindingGroup": "Mouse&Keyboard", 307 | "devices": [ 308 | { 309 | "devicePath": "", 310 | "isOptional": false, 311 | "isOR": false 312 | }, 313 | { 314 | "devicePath": "", 315 | "isOptional": false, 316 | "isOR": false 317 | } 318 | ] 319 | }, 320 | { 321 | "name": "Gamepad", 322 | "bindingGroup": "Gamepad", 323 | "devices": [ 324 | { 325 | "devicePath": "", 326 | "isOptional": false, 327 | "isOR": false 328 | } 329 | ] 330 | }, 331 | { 332 | "name": "Joystick", 333 | "bindingGroup": "Joystick", 334 | "devices": [ 335 | { 336 | "devicePath": "", 337 | "isOptional": true, 338 | "isOR": false 339 | } 340 | ] 341 | } 342 | ] 343 | } -------------------------------------------------------------------------------- /Samples/uInputter_VehicleControls.inputactions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5064152a25ef0aa4988b8ab6cbf3e3b9 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} 11 | generateWrapperCode: 0 12 | wrapperCodePath: 13 | wrapperClassName: 14 | wrapperCodeNamespace: 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.mrrobin.inputter", 3 | "version": "2.2.3", 4 | "displayName": "Inputter", 5 | "description": "Extension tool for the Unity Input System that adds support for the Logitech G29 steering wheel and provides additional functionality for handling input. This tool is designed to enhance the Unity Input System with new features and capabilities, making it easier to work with input devices and manage user interactions in your games and applications.", 6 | "unity": "2019.4", 7 | "keywords": [ 8 | "Inputter", 9 | "Logitech SDK", 10 | "Input System", 11 | "Extension" 12 | ], 13 | "author": { 14 | "name": "MrRobinOfficial", 15 | "email": "mrrobin123mail@gmail.com", 16 | "url": "https://github.com/MrRobinOfficial" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e31e1951c14613048927e67debdc4e74 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------