Edit

Bagikan melalui


PlayModeTestUtilities.UseSlowTestController Field

Definition

If true, the controller movement test steps will take a longer number of frames. This is especially useful for seeing motion in play mode tests (where the default smaller number of frames tends to make tests too fast to be understandable to the human eye). This is false by default to ensure that tests will run quickly in general, and can be set to true manually in specific test cases using the example below.

public: static bool UseSlowTestController;
public static bool UseSlowTestController;
 staticval mutable UseSlowTestController : bool
Public Shared UseSlowTestController As Boolean 

Field Value

Examples

[UnityTest]
public IEnumerator YourTestCase()
{
    PlayModeTestUtilities.UseSlowTestController = true;
    ...
    PlayModeTestUtilities.UseSlowTestController = false;
}

Remarks

Note that this value is reset to false after each play mode test that uses PlayModeTestUtilities.Setup() - this is to reduce the chance that a forgotten UseSlowTestController = true ends up slowing all subsequent tests.

Applies to