Search Unity

How can you make Unity detect Steam controller after game starts?

Discussion in 'Scripting' started by yoonitee, Aug 25, 2018.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    I got this bug from Steam:

    The Steam Controller is not recognized if it's plugged in after the game is launched.

    Any idea how to fix this issue? It's not required to fix it. But I feel like I should.
     
  2. kcreanor

    kcreanor

    Joined:
    Mar 22, 2015
    Posts:
    3
    I've just had the exact same feedback for my latest submission, did you ever manage to resolve this? I don't get this issue with any other input controller, and have been looking at the Steamworks documentation but there''s no indication of why this would be happening.

    The wording isn't particularly clear either, I'm guessing everything is ok if it's plugged in BEFORE the game is launched?
     
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,284
    Nope. I never fixed it. Also, I assume that anyone with a Steam rig will already have their controller plugged in. So it's kind of a stupid requirement.

    But IDK, I'm guessing it's to do with Unity. Maybe someone flag it as a bug?
    I'm using Unity 5.6

    Had my game published on Steam without fixing this. So maybe the 0.001% of people with Steam controllers will not be happy!
     
  4. AutoRotate

    AutoRotate

    Joined:
    Aug 1, 2014
    Posts:
    125
    I am not entirely sure but you might be able to use this event:
    Code (CSharp):
    1.         UnityEngine.XR.InputTracking.nodeAdded += InputTracking_nodeAdded;
    2.