Mobile verses PC detection?

edited September 2014 in Help request
Is there a way of detecting if a user is playing on a mobile/tablet as opposed to a PC/Mac? Use case would be displaying the correct instructions when a game starts up.

Something like the following pseudo code:
if (System.IsTablet || System.IsPhone || System.IsTouch){
} else {


  • edited September 2014
    Unfortunately, not directly.
    I'm long overdue to add a proper version number and that will be part of it.
    Till then, you can do that using config as it's likely that you're going to use different config files for different platforms, at least part of them.
    You can then simply add a Game.Platform variable or the like that you can query from your code.

    The way I'd do this particular feature though, would be by always calling a generic ShowInstructions() and the actual content would be different, all set inside the config.
  • edited September 2014
    Yes very good idea. I'll do that instead, thanks Iarwain.
Sign In or Register to comment.