Comments (3)
I've found what's causing the issue. No fix yet though. The package doesn't seem to like being built with IL2CPP. Building with Mono works fine.
from unisense.
Figured out a fix, but it's not nice.
IL2CPP builds require a "Fast" (precompiled) version of the input code. Luckily, that part can be easily generated with the Input System debugger window. This also requires that the Input System package version is 1.1.0 (or later), since certain bits of code in the generated script are only exposed in that version.
As for the nasty part, I Initially thought that the DualSense code had to be registered before the DualShock 4 code, but I was wrong. I haven't quite figured out how it works, but the DualSense initialization code has to be called around the same time as the DS4 code. I've only been able to get it working by calling DualSenseGamepadHID.Initialize()
in PerformDefaultPluginInitialization()
inside InputSystem.cs
.
from unisense.
I had another issue with il2cpp, when gamepad works perfect at editor, but at builds starts to messed up with what buttons was pressed. For example: stick up was always pressed.
In my case there was a bug at unity/il2cpp, that cause FieldOffset
attribute did not work properly.
Adding the line to DualSenseHIDInputReport.cs
file fixed the issue for me:
[InputControl(name = "rightTrigger", format = "BYTE")] [FieldOffset(6)]
public byte rightTrigger;
[FieldOffset(7)] public byte _notUsedByte7; // <-- this line
[InputControl(name = "dpad", format = "BIT", layout = "Dpad", sizeInBits = 4, defaultState = 8)]
from unisense.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unisense.