In my game, I’m able to detect MacOS and Windows in order for my game to recognize the Xbox controller for either system. But I didn’t see a way of detecting Linux in the Unity Script Reference. Does any know what the syntax would be for Linux, if needed? Code example below. Thanks.
public class InfoAxis : MonoBehaviour {
public bool macController;
public bool winController;
void Start () {
if (Application.platform == RuntimePlatform.WindowsPlayer){
winController=true;
}else{
winController=false;
}
if (Application.platform == RuntimePlatform.OSXPlayer){
macController=true;
}else{
macController=false;
}
}
void Update () {
...etc, etc ...
}
}