Open Sliver1002 opened 5 years ago
I'm trying to figure this out now too! @Sliver1002 did you ever solve this problem? I'll report back if I find out how this is done.
Hope that helps! @Sliver1002 @ankylosaure
To elaborate on the method I use:
Thanks! I'll be sure to try it out later!!!
Hey! It seems to reference a script called "VRControllerInputModule" and without it, it's throwing errors.
Thank you for being so patient!
@ankylosaure My mistake! You can comment out those two lines that are causing the error. I've also updated the script in my fork to exclude them: https://github.com/andyrbacon/JoyconLib/tree/master/Assets/JoyconLib_scripts
Hey, @andyrbacon I'm a current game dev student. When I load your scene and connect the JoyConManager.cs to the JoyConManager object's Script section, and connect the JoyConDemo to the cube's Script section I get an error "Failed to load 'Assets/JoyconLib_plugins/win32/hidapi.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture." And another error "DllNotFoundException: hidapi JoyconManager.Awake () (at Assets/JoyconLib_scripts/JoyconManager.cs:48)."
If at all possible a step by step guide would be absolutely amazing. I'm new to Unity so this may take a couple back and forth messages.
@SSoutham You should set correct platform for your plugin dll. If it's a x86 (win32 / 32-bits) dll, set to x86; if it's x64 (win64 / 64-bits) dll, set to x86_64.
@SSoutham I'm not sure what the issue is exactly. But you could make sure there is a folder titled "win64" in the folder "JoyconLib_plugins" with the api .dll found here: https://github.com/Looking-Glass/JoyconLib/blob/master/Assets/JoyconLib_plugins/win64/hidapi.dll
Allow me to rephrase:
Hey @SSoutham I ran into the DLL problem too, and solved it by starting a fresh project, importing the original unity package file from wormyrocks, then grabbing the new scripts from andyrbacon's modification and following his instructions from there.
Absolutely bizarre, but it worked. New Project, fresh import and dragging in the new scripts seemed to do the trick.
have anyone tried 4 joy cons (right x2, left x2)? The JoyconManager can get list j for 4 but the order will be different after re-play. I know we can use enumerate.product_id to detect left or right, but is it any solution to detect each device?
Facing the same challenge than maowu. Is it possible to detect each device as an independant controller (and not both left and right controllers paired together)?
Meaning, j variable already list the four of them independantly, but input detection (X/Y Stick Axis, Buttons) is totally different from a left/right pair of controllers (held vertically) to an unpaired set of controllers (held horizontally).
Thanks in advance!
Currently, what my solution is list the joy con consoles then set each device with index and isLeft. After my testing, the index is always follow the order you pair the joy con on windows (but it is random on mac). So I think it is a geek way to detect the device for me, but I really still look for if there is any other solution to detect each device like serial number or something else.
Hey, trying to use this solution and getting this error: Assets\JoyconDemo.cs(20,13): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List
Hello! Sorry if this is a bit of a noob question, but I'm working on a game where one player uses the left joy-con to control a spaceship, and the other player uses the right to control the turret. I seem to be having issues connecting a second Joy-Con, and was wondering how to do so.