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

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.

Use Unity - Scripting API: SystemInfo.deviceType

1 Like