Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Steam controller support?

Discussion in 'General Discussion' started by khos85, Feb 5, 2016.

  1. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi,

    I cannot seem to find a guide fore this, or if it even needed, how can I make sure my Unity game will support steam controllers, or other controller types?
    Thanks, for any info or advice given.
     
  2. McMayhem

    McMayhem

    Joined:
    Aug 24, 2011
    Posts:
    443
    Unity's Input Manager is pretty robust when it comes to handling input from controllers of any kind, actually. It even lets you separate the individual horizontal and vertical axis to get really crazy if you want. Take a look at the manual for that and see if that helps you out as far as general controller support goes.

    As for the Steam Controller, there's nothing special you need to do to make it compatible (other than have the game launch from Steam). There are certain parts of the Steam Controller, like the touch-pad GUI, that require the Steam Overlay to be active and drawing on top of your game. The controller uses the overlay to display the touch-pad options.

    I've actually just integrated my own kind of support system for the Steam Controller in my game, so I've actually had some experience with this. If you're looking to do anything specific, just let me know.
     
    theANMATOR2b likes this.
  3. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Oh ok, many thanks for the info, much appreciated. I use e.g Input.GetKey(Keycode.Y) currently so I suppose this is not good practice, I just realised this.. should I set the Axis's / Inputs in the the manager then use those instead? Can extra Inputs be mapped to controller buttons?
     
  4. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    Adding Steam Controller support is something that happens outside of Unity.
    What you do is create a game that supports KBM or a standard controller (ideally both) and create a preset for the Steam Controller from within Steam's Big Picture mode.
    The SC isn't a regular controller. When you plug it in, it acts as keyboard, mouse and generic controller at once and has to be configured with a proper preset.

    So rather than adding SC support to your game, you add support for your game to the SC. It's the other way around.
     
    Maloke, murkantilism and theANMATOR2b like this.
  5. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    332
    A controller configuration or implementation in a game is pretty much universal. You could perhaps give the player an option to customize which keys do what though, for flexibility.
     
  6. Toxast

    Toxast

    Joined:
    Sep 10, 2012
    Posts:
    3
    Is there a way to disable native Steam Controllers support? I already have them integrated my way.