Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,363
    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,363
    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. FlightOfOne

    FlightOfOne

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