As of release 0.13.35 we introduced some new game level device attributes for you to use! They’re located in the game tab under devices on Mac computers:
To access these devices on a Windows computer, they’re located under “Attributes” -> “Devices” -> “Platform” in the expression editor box:
These attributes will give you access to information about the device your game is running on, such as:
- Region: The country code of where the person with the device is
- Language: The language setting being used on the device
- Name: The name of the operating system
- Mac- osx
- iOS Devices- iPhone OS
- Android- Android
- Version: The version of the operating system that the device is running
- Model: The model of the device
You can see a nice list of what the Model attribute will contain for each iOS device here: https://www.theiphonewiki.com/wiki/Models. The Model attribute will contain the information that is under the Identifier column.
For a list of what the Model attribute will contain on Android devices, there’s a nice list in pdf form from Google here: https://storage.googleapis.com/support-kms-prod/61064765E6620C413FE3010AC51BDFA9098F. The Model attribute will contain the information that is under the Model column.
You can find the list of Region codes for both iOS and Android devices here: https://en.wikipedia.org/wiki/ISO_3166-1. If you scroll down a little bit you’ll see a nice table that has both 2 letter and 3 letter country codes. Note: Both iOS and Android devices use the 2 letter country code. Using “United States of America” as a region example, it would contain “US” on iOS devices and “USA” on Android devices.
For a list of Language codes for both iOS and Android devices here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes. The table on that page includes some extra info you don’t need. Android devices use the 639-3 code, while iOS devices use the 639-1 code. Using German as an example language, it would appear as “de” in the Language attribute on iOS devices, and as “deu” on Android devices.
Here’s an example of what each attribute displayed during an adhoc build on a iPhone 5c running iOS 8.4.1 contains:
Here’s an example of what each attribute displayed during an adhoc build on a Nexus 7 running Android 4.4.4 with Language and Input set to German (Deutsch) contains:
Download the sample file used in this entry!
To use the sample project below, click the button, save the archive to your computer, then unzip the file and open the .gameproj file.Download Sample File