Redigera

Dela via


PlayModeTestUtilities.UseSlowTestHand Property

Definition

Caution

Use UseSlowTestController instead.

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 property bool UseSlowTestHand { bool get(); void set(bool value); };
[System.Obsolete("Use UseSlowTestController instead.")]
public static bool UseSlowTestHand { get; set; }
[<System.Obsolete("Use UseSlowTestController instead.")>]
static member UseSlowTestHand : bool with get, set
Public Shared Property UseSlowTestHand As Boolean

Property Value

Attributes

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