Search Unity

How to detect if UWP player is running on Xbox One or PC?

Discussion in 'Windows' started by Peter77, Sep 5, 2017.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,622
    How can I detect if an UWP player is running on an Xbox One or PC? Since the same UWP player runs on both, I can't use platform depended compilation. Application.platform would also just return "WSAPlayer64" without a differentiation between Xbox/PC.

    I need to know on which platform the game is running to enable different options, as well as display a different set of controller images, icons and texts.

    PS: I'm using Unity 2017.1.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,920