SystemInfo.graphicsDeviceName 显卡名称

static var graphicsDeviceName : string

Description描述

The name of the graphics device (Read Only).

显卡的名字(只读)。

This is the name of user's graphics card, as reported by the graphics driver.

这个是返回用户显卡的名称。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(SystemInfo.graphicsDeviceName);
	}
}
// Prints "ATI Radeon X1600 OpenGL Engine" on MacBook Pro running OS X 10.4.8
//打印当前显卡的名称

print (SystemInfo.graphicsDeviceName);

Note that the same graphics card can be reported by different names depending on the operating system, driver and so on. If you want to reliably identify some specific card, use SystemInfo.graphicsDeviceID SystemInfo.graphicsDeviceVendorID.

注意,相同的显卡可能报告为不同的名字,取决于操作系统、驱动等等。如果您想准确识别某些特定卡,使用SystemInfo.graphicsDeviceIDSystemInfo.graphicsDeviceVendorID

参见:SystemInfo.graphicsDeviceID, SystemInfo.graphicsDeviceVendor, SystemInfo.graphicsDeviceVersion.

最后修改:2011年3月18日 Friday 17:49

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。