Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.9.0][Linux] 'SwitchProControllerHID' could not be found #733

Closed
SKroell opened this issue Jul 22, 2019 · 6 comments
Closed

[0.9.0][Linux] 'SwitchProControllerHID' could not be found #733

SKroell opened this issue Jul 22, 2019 · 6 comments

Comments

@SKroell
Copy link

SKroell commented Jul 22, 2019

When trying to build a project for Linux, it fails with the error:

Library\PackageCache\com.unity.inputsystem@0.9.0-preview\InputSystem\Plugins\Switch\SwitchSupport.cs(26,40): error CS0246: The type or namespace name 'SwitchProControllerHID' could not be found (are you missing a using directive or an assembly reference?)
@SolAZDev
Copy link

SolAZDev commented Aug 4, 2019

I can confirm this bug. It prohibited me from compiling for Linux

@SKroell
Copy link
Author

SKroell commented Aug 4, 2019

I can confirm this bug. It prohibited me from compiling for Linux in a Game Jam

As a temporary solution (where you don't need switch support), you can get rid of it by simply commenting out that bit of code.

@SolAZDev
Copy link

SolAZDev commented Aug 4, 2019

I can confirm this bug. It prohibited me from compiling for Linux in a Game Jam

As a temporary solution (where you don't need switch support), you can get rid of it by simply commenting out that bit of code.

Mind telling me where to comment?
EDIT: Opened the SwitchSupport.cs and commented everything inside Initialize(), is this the correct area to comment?

@SKroell
Copy link
Author

SKroell commented Aug 4, 2019

In (Project Root)\Library\PackageCache\com.unity.inputsystem@0.9.0-preview\InputSystem\Plugins\Switch\SwitchSupport.cs comment out line 26-30.

Should look like this:

#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WSA
//        InputSystem.RegisterLayout<SwitchProControllerHID>(
//        matches: new InputDeviceMatcher()
//            .WithInterface("HID")
//            .WithCapability("vendorId", 0x57e) // Nintendo
//            .WithCapability("productId", 0x2009)); // Pro Controller.
#endif

@stefanunity
Copy link
Collaborator

Hello,
we can reproduce this and converted it into an internal case. It will show up at https://issuetracker.unity3d.com/product/unity/issues/guid/1174421/ soon.

@basemmerink
Copy link

basemmerink commented Jul 31, 2022

This feels super related so instead of making a new issue I decided to revive this one.
If this is inappropriate please let me know, and I'll create an issue the regular way.

It seems like this issue has resurfaced again, though in this case it's an entire namespace that can not be found.
This occurs only when building for Linux. Windows (x32 and x64) and MacOS work fine.
I am building on a Windows 64 bit machine.

This is in Unity 2021.3.7f1, Personal edition
Input System Version 1.3.0 - January 05, 2022

The line that is failing using UnityEngine.InputSystem.Switch;

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants