GetDeviceInfo.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using UnityEngine;
  2. /// <summary>
  3. /// 获取设备信息
  4. /// </summary>
  5. public class GetDeviceInfo : MonoBehaviour
  6. {
  7. private void Start()
  8. {
  9. GetDeviceInformation();
  10. }
  11. private void GetDeviceInformation()
  12. {
  13. Debug.Log("[MercuryX2]:读取设备的详细信息");
  14. Debug.Log("[MercuryX2]:设备模型:" + SystemInfo.deviceModel);
  15. Debug.Log("[MercuryX2]:设备名称:" + SystemInfo.deviceName);
  16. Debug.Log("[MercuryX2]:设备类型:" + SystemInfo.deviceType.ToString());
  17. Debug.Log("[MercuryX2]:设备唯一标识符:" + SystemInfo.deviceUniqueIdentifier);
  18. Debug.Log("[MercuryX2]:是否支持纹理复制:" + SystemInfo.copyTextureSupport.ToString());
  19. Debug.Log("[MercuryX2]:显卡ID:" + SystemInfo.graphicsDeviceID.ToString());
  20. Debug.Log("[MercuryX2]:显卡名称:" + SystemInfo.graphicsDeviceName);
  21. Debug.Log("[MercuryX2]:显卡类型:" + SystemInfo.graphicsDeviceType.ToString());
  22. Debug.Log("[MercuryX2]:显卡供应商:" + SystemInfo.graphicsDeviceVendor);
  23. Debug.Log("[MercuryX2]:显卡供应商ID:" + SystemInfo.graphicsDeviceVendorID.ToString());
  24. Debug.Log("[MercuryX2]:显卡版本号:" + SystemInfo.graphicsDeviceVersion);
  25. Debug.Log("[MercuryX2]:显存大小(单位:MB):" + SystemInfo.graphicsMemorySize);
  26. Debug.Log("[MercuryX2]:显卡是否支持多线程渲染:" + SystemInfo.graphicsMultiThreaded.ToString());
  27. Debug.Log("[MercuryX2]:支持的渲染目标数量:" + SystemInfo.supportedRenderTargetCount.ToString());
  28. Debug.Log("[MercuryX2]:系统内存大小(单位:MB):" + SystemInfo.systemMemorySize.ToString());
  29. Debug.Log("[MercuryX2]:操作系统:" + SystemInfo.operatingSystem);
  30. }
  31. private void OnGUI()
  32. {
  33. GUILayout.Space(10);
  34. GUILayout.Label("设备的详细信息");
  35. GUILayout.Label("设备模型:" + SystemInfo.deviceModel);
  36. GUILayout.Label("设备名称:" + SystemInfo.deviceName);
  37. GUILayout.Label("设备类型:" + SystemInfo.deviceType.ToString());
  38. GUILayout.Label("设备唯一标识符:" + SystemInfo.deviceUniqueIdentifier);
  39. GUILayout.Label("是否支持纹理复制:" + SystemInfo.copyTextureSupport.ToString());
  40. GUILayout.Label("显卡ID:" + SystemInfo.graphicsDeviceID.ToString());
  41. GUILayout.Label("显卡名称:" + SystemInfo.graphicsDeviceName);
  42. GUILayout.Label("显卡类型:" + SystemInfo.graphicsDeviceType.ToString());
  43. GUILayout.Label("显卡供应商:" + SystemInfo.graphicsDeviceVendor);
  44. GUILayout.Label("显卡供应商ID:" + SystemInfo.graphicsDeviceVendorID.ToString());
  45. GUILayout.Label("显卡版本号:" + SystemInfo.graphicsDeviceVersion);
  46. GUILayout.Label("显存大小(单位:MB):" + SystemInfo.graphicsMemorySize);
  47. GUILayout.Label("显卡是否支持多线程渲染:" + SystemInfo.graphicsMultiThreaded.ToString());
  48. GUILayout.Label("支持的渲染目标数量:" + SystemInfo.supportedRenderTargetCount.ToString());
  49. GUILayout.Label("系统内存大小(单位:MB):" + SystemInfo.systemMemorySize.ToString());
  50. GUILayout.Label("操作系统:" + SystemInfo.operatingSystem);
  51. }
  52. }