- Home /
Access AndroidTargetDevice (PlayerSettings) from code
I'm trying to get the AndroidTargetDevice in an editor script, for example this works for iOS Architecture property:
(iPhoneArchitecture)PlayerSettings.GetPropertyInt("Architecture", BuildTargetGroup.iPhone)
However, I don't know what the property name is for the AndroidTargetDevice. It is listed as "Device Filter" in the editor gui. Does anyone know the Property name for this field?
These do not work:
PlayerSettings.GetPropertyInt("DeviceFilter", BuildTargetGroup.Android)
PlayerSettings.GetPropertyInt("AndroidDeviceFilter", BuildTargetGroup.Android)
PlayerSettings.GetPropertyInt("TargetDevice", BuildTargetGroup.Android)
Comment
Best Answer
Answer by eezSZI · Mar 24, 2015 at 07:53 PM
Somehow I missed this in the API:
PlayerSettings.Android.targetDevice
Your answer
Follow this Question
Related Questions
Set Bundle Version Code through editor script 3 Answers
I can't install my app (.apk) on my android device 2 Answers
Apply only a single value to prefab 1 Answer
Audio popping on pause and volume change 1 Answer
How do I enable VR in player settings on an android build target through C# on the command line? 0 Answers