Search Unity

Question Switch Controller support on Linux

Discussion in 'Linux' started by SchnozzleCat, Jul 22, 2022.

  1. SchnozzleCat

    SchnozzleCat

    Joined:
    Oct 23, 2013
    Posts:
    42
    When attempting to build on Linux, I get this error:

    CS0234: The type or namespace name 'Switch' does not exist in the namespace 'UnityEngine.InputSystem' (are you missing an assembly reference?)


    However, the input system page states that switch controllers are supported under Linux, so I'm not sure what the issue is.

    https://docs.unity3d.com/Packages/com.unity.inputsystem@1.4/manual/SupportedDevices.html

    The same project builds fine when building for windows on a windows machine.
     
  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    602
  3. SchnozzleCat

    SchnozzleCat

    Joined:
    Oct 23, 2013
    Posts:
    42
    I know that a preprocessor directive is excluding the switch controller code from being compiled, my question is, why?

    The link I posted states that switch controllers are supported under linux.

    Edit: The docs also read this for the SwitchProControllerHID class: A Nintendo Switch Pro controller connected to a desktop mac/windows PC using the HID interface.

    Are we supposed to interface another way with a switch pro controller on linux, or are only input actions using switch controllers supported (and not the SwitchProControllerHID class)?
     
  4. Baasbase

    Baasbase

    Joined:
    Oct 1, 2020
    Posts:
    4
    I have the same question. Is this a bug? I've found an issue on the inputsystem git that said this was fixed somewhere in 2019.
    https://github.com/Unity-Technologies/InputSystem/issues/733

    I have bumped that issue, but haven't had a response yet.
    It is preventing me from doing a successful linux build.
    If anyone knows of a short-term workaround I'll gladly hear