Class BakeLightingAttribute
Attribute to bake lighting for the specified scenes before running graphics tests. This attribute should be used on a test class or test method.
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public class BakeLightingAttribute : GraphicsPrebuildSetupAttribute
Remarks
This attribute will bake lighting for the specified scenes as a pre-build step. The scenes will be opened one by one, and the lighting will be baked for each scene. If the lighting bake fails for any scene, an error will be logged.
Constructors
BakeLightingAttribute(int, params string[])
Creates a new instance of the BakeLightingAttribute class.
Declaration
public BakeLightingAttribute(int order, params string[] scenePaths)
Parameters
| Type | Name | Description |
|---|---|---|
| int | order | The order in which to run the pre-build step. |
| string[] | scenePaths | The paths of the scenes to bake lighting for. |
Remarks
The order is used to determine the order in which the pre-build steps are run. Lower numbers are run first.
BakeLightingAttribute(params string[])
Creates a new instance of the BakeLightingAttribute class.
Declaration
public BakeLightingAttribute(params string[] scenePaths)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | scenePaths | The paths of the scenes to bake lighting for. |
Methods
Setup()
Attribute to mark a method or class as a pre-build setup step for graphics tests. This attribute should be used on a test class or test method.
Declaration
protected override void Setup()
Overrides
Remarks
This attribute will be used to run setup actions before building the graphics test project. The setup actions will be run in the order they are defined. The order is used to determine the order in which the pre-build steps are run. Lower numbers are run first.