Class GraphicsDeviceInfo
A class that provides information about the current graphics device.
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public static class GraphicsDeviceInfo
Remarks
This class is a wrapper around the SystemInfo class and provides a way to query the current graphics device information. It provides properties to get the name, type, ID, vendor, vendor ID, version, memory size, and shader level of the current graphics device. It also provides methods to check if the current graphics device is of a specific vendor, has at least a certain memory size, has at least a certain shader level, or has at least a certain version. The class also provides a method to print the current graphics device information.
Properties
DeviceID
The ID of the graphics device.
Declaration
public static int DeviceID { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This is a unique identifier for the graphics device. See graphicsDeviceID for more information.
MemorySize
The memory size of the graphics device.
Declaration
public static int MemorySize { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This is an integer that represents the memory size of the graphics device. See graphicsMemorySize for more information.
Name
The name of the graphics device.
Declaration
public static string Name { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This is a string that represents the name of the graphics device. See graphicsDeviceName for more information.
ShaderLevel
The shader level of the graphics device.
Declaration
public static int ShaderLevel { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This is an integer that represents the shader level of the graphics device. See graphicsShaderLevel for more information.
Type
The type of the graphics device.
Declaration
public static GraphicsDeviceType Type { get; }
Property Value
Type | Description |
---|---|
GraphicsDeviceType |
Remarks
This is an enum that represents the type of the graphics device. See graphicsDeviceType for more information.
Vendor
The vendor of the graphics device.
Declaration
public static string Vendor { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This is a string that represents the vendor of the graphics device. See graphicsDeviceVendor for more information.
VendorID
The vendor ID of the graphics device.
Declaration
public static int VendorID { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This is a unique identifier for the vendor of the graphics device. See graphicsDeviceVendorID for more information.
Version
The version of the graphics device.
Declaration
public static string Version { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This is a string that represents the version of the graphics device. See graphicsDeviceVersion for more information.
Methods
IsMemorySizeAtLeast(int)
Checks if the current graphics device memory size is at least the specified size.
Declaration
public static bool IsMemorySizeAtLeast(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The size to check for |
Returns
Type | Description |
---|---|
bool | True if the current graphics device memory size is at least the specified size, false otherwise |
IsShaderLevelAtLeast(int)
Checks if the current graphics device shader level is at least the specified level.
Declaration
public static bool IsShaderLevelAtLeast(int level)
Parameters
Type | Name | Description |
---|---|---|
int | level | The level to check for |
Returns
Type | Description |
---|---|
bool | True if the current graphics device shader level is at least the specified level, false otherwise |
IsVendor(GraphicsVendor)
Checks if the current graphics device is of the specified vendor.
Declaration
public static bool IsVendor(GraphicsVendor vendor)
Parameters
Type | Name | Description |
---|---|---|
GraphicsVendor | vendor | The vendor to check for |
Returns
Type | Description |
---|---|
bool | True if the current graphics device is of the specified vendor, false otherwise |
Remarks
This method checks if the current graphics device is of the specified vendor. It does this by comparing the vendor ID of the current graphics device with the vendor ID of the specified vendor.
IsVersionAtLeast(string)
Checks if the current graphics device version is at least the specified version.
Declaration
public static bool IsVersionAtLeast(string version)
Parameters
Type | Name | Description |
---|---|---|
string | version | The version to check for |
Returns
Type | Description |
---|---|
bool | True if the current graphics device version is at least the specified version, false otherwise |
PrintDeviceInfo()
Returns a string representation of the current graphics device information.
Declaration
public static string PrintDeviceInfo()
Returns
Type | Description |
---|---|
string |