因为UWP一个包可以同时安装在xbox和win10上,而unity的Application.platform不管在xbox和win10上总是返回WSAPlayer64。使用下面的方法即可判断。
SystemInfo.deviceType == DeviceType.Console;
SystemInfo.deviceType == DeviceType.Desktop;
参考:https://docs.unity3d.com/ScriptReference/SystemInfo-deviceType.html