Class GraphicsTestPlatform
Represents the platform properties of a test environment.
Implements
Inherited Members
Namespace: UnityEngine.TestTools.Graphics.Platforms
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public sealed class GraphicsTestPlatform : IEquatable<GraphicsTestPlatform>
Constructors
GraphicsTestPlatform(params Enum[])
Creates a new GraphicsTestPlatform using all available DataType enums
Declaration
public GraphicsTestPlatform(params Enum[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| Enum[] | values | The specific values for this platform. These can be of any DataType that has been declared in the project. There cannot be two values of the same type. |
GraphicsTestPlatform(GraphicsTestPlatform, params Enum[])
Creates a new GraphicsTestPlatform using the data from basePlatform and adding data from values
Declaration
public GraphicsTestPlatform(GraphicsTestPlatform basePlatform, params Enum[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | basePlatform | The platform to base the new platform on. The constructor will copy the data from the |
| Enum[] | values | The specific values for this platform. These can be of any DataType that has been declared in the project. There cannot be two values of the same type. |
GraphicsTestPlatform(GraphicsTestPlatform, PlatformSchema)
Creates a new GraphicsTestPlatform using the data from basePlatform but using the schema schema
Declaration
public GraphicsTestPlatform(GraphicsTestPlatform basePlatform, PlatformSchema schema)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | basePlatform | The platform to base the new platform on. The constructor will copy the data from the |
| PlatformSchema | schema | The schema to use for constructing this platform. Only values of DataType present in the schema will be added to the platform's data |
GraphicsTestPlatform(PlatformSchema, params Enum[])
Creates a new GraphicsTestPlatform using all DataType enums present in the schema
Declaration
public GraphicsTestPlatform(PlatformSchema schema, params Enum[] values)
Parameters
| Type | Name | Description |
|---|---|---|
| PlatformSchema | schema | The schema to use for constructing this platform. Only values of DataType present in the schema will be added to the platform's data |
| Enum[] | values | The specific values for this platform. These can be of any DataType that has been declared in the project. There cannot be two values of the same type. |
Properties
AllResultsPaths
All the possible results paths for this platform, ordered based on its platform schema.
Declaration
public IEnumerable<string> AllResultsPaths { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Current
The current test environment. This constructs the current platform based on all available DataType
Declaration
public static GraphicsTestPlatform Current { get; }
Property Value
| Type | Description |
|---|---|
| GraphicsTestPlatform |
Default
The 'Default' GraphicsTestPlatform. It IsSupersetOf(GraphicsTestPlatform) all other nodes.
Declaration
public static GraphicsTestPlatform Default { get; }
Property Value
| Type | Description |
|---|---|
| GraphicsTestPlatform |
IsEditorPlatform
Returns true if the GraphicsTestPlatform is an editor platform.
Declaration
public bool IsEditorPlatform { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
The name of this platform, as it will appear on test content bundle names.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
PlayerBuild
The current build environment settings. This constructs the build platform based on all available DataType
Declaration
public static GraphicsTestPlatform PlayerBuild { get; }
Property Value
| Type | Description |
|---|---|
| GraphicsTestPlatform |
ResultsPath
Returns the directory path for the test results.
Declaration
public string ResultsPath { get; }
Property Value
| Type | Description |
|---|---|
| string | The directory path for the test results. |
Remarks
The path is constructed from the color space, platform, graphics device, and XR device. For example: Linear/WindowsEditor/Direct3D11/None
Methods
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
Equals(GraphicsTestPlatform)
Declaration
public bool Equals(GraphicsTestPlatform other)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | other |
Returns
| Type | Description |
|---|---|
| bool |
GetBuildPlatform(PlatformSchema)
Retrieves the current build platform based on a specified schema.
Declaration
public static GraphicsTestPlatform GetBuildPlatform(PlatformSchema schema)
Parameters
| Type | Name | Description |
|---|---|---|
| PlatformSchema | schema | The schema to use for constructing the current build platform. |
Returns
| Type | Description |
|---|---|
| GraphicsTestPlatform | A new GraphicsTestPlatform based on the current build settings and the given schema. |
GetCurrent(PlatformSchema)
Retrieves the current platform based on a specified schema.
Declaration
public static GraphicsTestPlatform GetCurrent(PlatformSchema schema)
Parameters
| Type | Name | Description |
|---|---|---|
| PlatformSchema | schema | The schema to use for constructing the current platform. |
Returns
| Type | Description |
|---|---|
| GraphicsTestPlatform | A new GraphicsTestPlatform based on the current state and the given schema. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
GetValue<T>()
Retrieves the value of the data with type T if present in the platform's data.
Declaration
public T GetValue<T>() where T : Enum
Returns
| Type | Description |
|---|---|
| T | The |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the enum to be retrieved. For example RuntimePlatform |
IsSubsetOf(GraphicsTestPlatform)
Returns true if the GraphicsTestPlatform is a subset of the other specified GraphicsTestPlatform.
Declaration
public bool IsSubsetOf(GraphicsTestPlatform other)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | other | The GraphicsTestPlatform to compare against. |
Returns
| Type | Description |
|---|---|
| bool | True if the GraphicsTestPlatform is a subset of the other specified GraphicsTestPlatform, false otherwise. |
Remarks
A GraphicsTestPlatform is a subset of another if all of its properties are equal to or more specific than the other. For example, a GraphicsTestPlatform with a specific architecture and platform is a subset of a GraphicsTestPlatform with a default architecture and platform.
IsSupersetOf(GraphicsTestPlatform)
Returns true if the GraphicsTestPlatform is a superset of the other specified GraphicsTestPlatform.
Declaration
public bool IsSupersetOf(GraphicsTestPlatform other)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | other | The GraphicsTestPlatform to compare against. |
Returns
| Type | Description |
|---|---|
| bool | True if the GraphicsTestPlatform is a superset of the other specified GraphicsTestPlatform, false otherwise. |
Remarks
A GraphicsTestPlatform is a superset of another if all of its properties are equal to or less specific than the other. For example, a GraphicsTestPlatform with a default architecture and platform is a superset of a GraphicsTestPlatform with a specific architecture and platform.
PrintPlatformInfo()
A string representation of the GraphicsTestPlatform for printing to the console.
Declaration
public string PrintPlatformInfo()
Returns
| Type | Description |
|---|---|
| string | The string representation of the platform information. |
ToString()
Converts the GraphicsTestPlatform to a string value.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The string representation of the GraphicsTestPlatform. |
Overrides
Operators
operator ==(GraphicsTestPlatform, GraphicsTestPlatform)
Declaration
public static bool operator ==(GraphicsTestPlatform x, GraphicsTestPlatform y)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | x | |
| GraphicsTestPlatform | y |
Returns
| Type | Description |
|---|---|
| bool |
operator >(GraphicsTestPlatform, GraphicsTestPlatform)
Compares two GraphicsTestPlatform to see if the left is a superset of the right.
Declaration
public static bool operator >(GraphicsTestPlatform left, GraphicsTestPlatform right)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | left | The left GraphicsTestPlatform to compare. |
| GraphicsTestPlatform | right | The right GraphicsTestPlatform to compare. |
Returns
| Type | Description |
|---|---|
| bool | True if the left GraphicsTestPlatform is a superset of the right GraphicsTestPlatform and not equal. |
operator >=(GraphicsTestPlatform, GraphicsTestPlatform)
Compares two GraphicsTestPlatform to see if the left is a superset of the right.
Declaration
public static bool operator >=(GraphicsTestPlatform left, GraphicsTestPlatform right)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | left | The left GraphicsTestPlatform to compare. |
| GraphicsTestPlatform | right | The right GraphicsTestPlatform to compare. |
Returns
| Type | Description |
|---|---|
| bool | True if the left GraphicsTestPlatform is a superset of the right GraphicsTestPlatform or if they are equal. |
operator !=(GraphicsTestPlatform, GraphicsTestPlatform)
Declaration
public static bool operator !=(GraphicsTestPlatform x, GraphicsTestPlatform y)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | x | |
| GraphicsTestPlatform | y |
Returns
| Type | Description |
|---|---|
| bool |
operator <(GraphicsTestPlatform, GraphicsTestPlatform)
Compares two GraphicsTestPlatform to see if the left is a subset of the right.
Declaration
public static bool operator <(GraphicsTestPlatform left, GraphicsTestPlatform right)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | left | The left GraphicsTestPlatform to compare. |
| GraphicsTestPlatform | right | The right GraphicsTestPlatform to compare. |
Returns
| Type | Description |
|---|---|
| bool | True if the left GraphicsTestPlatform is a subset of the right GraphicsTestPlatform and not equal. |
operator <=(GraphicsTestPlatform, GraphicsTestPlatform)
Compares two GraphicsTestPlatform to see if the left is a subset of the right.
Declaration
public static bool operator <=(GraphicsTestPlatform left, GraphicsTestPlatform right)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsTestPlatform | left | The left GraphicsTestPlatform to compare. |
| GraphicsTestPlatform | right | The right GraphicsTestPlatform to compare. |
Returns
| Type | Description |
|---|---|
| bool | True if the left GraphicsTestPlatform is a subset of the right GraphicsTestPlatform or if they are equal. |