mrtimcakes / unity-directinput Goto Github PK
View Code? Open in Web Editor NEWUnity Native Plugin to expose DirectX DirectInput ForceFeedback
License: GNU Lesser General Public License v3.0
Unity Native Plugin to expose DirectX DirectInput ForceFeedback
License: GNU Lesser General Public License v3.0
To be able to use this library, due to the gpl license the whole source code of the game must also be released with a gpl-compatible license.
I don't know if I want to use this as I don't want to test it due to the license.
If the point is to force the release of changes to the source code of this project alone, the lgpl, mozilla or apache license may be better choices.
Thank you.
When profiling our game, we've found that DirectInputManager.Poll
method generates garbage on each frame (about 0.8 to 1.6 KB, which is a significant amount in a game that produces around 2KB in total per frame). Any chance this can be looked into to determine why? Thanks!
Cannot call certain functions of the library:
GetDeviceCapabilities
GetActiveDevices
Throws an error of:
MarshalDirectiveException: string/stringbuilder marshalling conversion 29 not implemented
Typically calls to EnumerateDevices
which calls _DirectInput->EnumDevices
take about 85ms on average on my system.
Sometimes, this is orders of magnitude larger taking in the range of minutes instead of milliseconds.
This is due to device drivers on the system, in my case a Corsair K70 Keyboard, hanging and not replying to Window's request to query attached devices.
The issue has already been discussed on StackOverflow: https://stackoverflow.com/q/10967795
Hi,
I noticed that different DirectInput devices get different layout names. I want to rebind actions across DirectInput devices but filter none-DirectInput layouts such as regular USB Joystick.
I used Input's control schemes to do that. But the different layout names of di devices block the rebinding.
I change this part to do that.
But this will cause input conflicts if 2+ devices are used simultaneously.
Error codes from the DLL plugin does not pass through.
Unable to get error code string from System -> System.ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.PtrToStringAnsi(intptr)
As the title says, the aforementioned wheel is not recognized by Unity-DirectInput. It could be that the wheel reports it's type as something unexpected. Unitys InputSystem reports it as UnityEngine.InputSystem.Joystick.
Hi,
I followed the Quick Start 100%, but I failed and got unity console errors.
I tried to import Unity-DirectInput manually to generate the meta files.
Tested with InputSystem 1.3.0 and and 1.4.3, DirectInput devices show up in the Input Debugger, and the values of their controls do change properly. However, InputAction.PerformInteractiveRebinding() does not detect any of these virtual devices.
Regular devices that are detected natively through the InputSystem do function properly.
Is there a special way to perform rebinding on them?
Thanks!
Hello, I am tinkering with this plugin to try and prototype some force feedback steering wheel controls in a potential future unity project. I currently have two FFB capable steering wheels that are listed as not supported (Logitech MOMO Force Feedback and Moza R9) and I was wondering why only a few devices are supported. I have not yet tried my Moza R9, but in testing with my Logitech MOMO steering wheel, I can see it shows in the unity Input Debugger as both the normal joystick (the one shown anyways with the new input system) and as a DI_Logitech MOMO Racing. I assume the DI_Logitech MOMO Racing is a DirectInput wrapped virtual device version of the steering wheel. I can see it working with the X and Y axes, and I can use it as a input device in itself to input in unity. However, it is tagged as "FFBCapable":false", even though it is FFBCapable (Is this flag created by your plugin, perhaps?). In using the sample code and sample inputactions provided, I tried to bypass the FFBCapable check, and the wheel then got recognised, but then I would get errors when I enable any of the FFB bools in the inspector of the sample code. (Error thrown from a hresult check in UpdateConstantForceSimple in DirectInputManager). I suspect there is more to this than simple flags, and I would like to know more, if you have the time to explain.
If the reason for the limited wheel support is that it has to be manually added and tested by you, I would be interested in contributing to the project with the two wheels I have at least :)
Thank you.
It is normal for me to run on my development machine. Include running in editor
But after I build, the program cannot work normally when running on a new win 64 bit system. Please help me analyze the lo
Player.log
g
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.