日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class InteractableTests

    Class that tests various types of Interactable buttons and UX components. Validates various forms of input (i.e speech etc) against various configurations of Interactable.

    Inheritance
    Object
    BasePlayModeTests
    InteractableTests
    Inherited Members
    BasePlayModeTests.TearDown()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Tests
    Assembly: cs.temp.dll.dll
    Syntax
    public class InteractableTests : BasePlayModeTests

    Methods

    Setup()

    Set initial state before each test.

    Declaration
    public override IEnumerator Setup()
    Returns
    Type Description
    IEnumerator

    enumerator

    Overrides
    BasePlayModeTests.Setup()
    Remarks

    Note that, in order to catch incorrect reliances on identity camera transforms early on, this Setup() sets the playspace transform to an arbitrary pose. This can be overridden where appropriate for an individual test by starting off with, e.g., PlayspaceToOriginLookingForward(). However, it is preferable to retain the arbitrary pose, and use the helpers within TestUtilities to align test objects with the camera. For example, to place an object 8 meters in front of the camera, set its global position to: TestUtilities.PositionRelativeToPlayspace(0.0f, 0.0f, 8.0f); See usage of these helpers throughout the tests within this file, e.g. TestHandInputOnRuntimeAssembled(). See also comments at PlayspaceToArbitraryPose().

    TestButtonStateResetWhenFocusLostAfterPinch()

    Test if Button state is reset when it goes out of focus from a pressed state

    Declaration
    public IEnumerator TestButtonStateResetWhenFocusLostAfterPinch()
    Returns
    Type Description
    IEnumerator

    TestDestroy()

    Instantiates a runtime assembled Interactable and destroy the Interactable component

    Declaration
    public IEnumerator TestDestroy()
    Returns
    Type Description
    IEnumerator

    TestDimensions()

    Assemble an Interactable GameObject and test various SelectionModes

    Declaration
    public void TestDimensions()

    TestDisabledOnStart()

    Tests that Interactable configured not Enabled on start works as expected. Enabled on start is an editor level setting only that is applied on Awake/Start

    Declaration
    public IEnumerator TestDisabledOnStart()
    Returns
    Type Description
    IEnumerator

    TestDisabledStateThemes()

    Instantiates a runtime assembled Interactable and set Interactable state to disabled (not disabling the GameObject/component)

    Declaration
    public IEnumerator TestDisabledStateThemes()
    Returns
    Type Description
    IEnumerator

    TestDisableOnClick()

    Tests button depth and focus state after enabling, disabling and re-enabling Interactable internally via IsEnabled. The focus state after re-enabling should be false and button depth should be in its default position. This test is specifically addressing behavior described in issue 4967.

    Declaration
    public IEnumerator TestDisableOnClick()
    Returns
    Type Description
    IEnumerator

    TestForceInitialize()

    Ensure a disabled Interactable initializes when accessing one of its properties even though its Awake() has not been called

    Declaration
    public IEnumerator TestForceInitialize()
    Returns
    Type Description
    IEnumerator

    TestHandInputOnPrefab()

    Instantiates a push button prefab and uses simulated hand input to press it.

    Declaration
    public IEnumerator TestHandInputOnPrefab()
    Returns
    Type Description
    IEnumerator

    TestHandInputOnRuntimeAssembled()

    Assembles a push button from primitives and uses simulated hand input to press it.

    Declaration
    public IEnumerator TestHandInputOnRuntimeAssembled()
    Returns
    Type Description
    IEnumerator

    TestInputActions()

    Assembles a push button from primitives and uses simulated input events to press it.

    Declaration
    public IEnumerator TestInputActions()
    Returns
    Type Description
    IEnumerator

    TestInteractableToggleCollectionIndexUpdate()

    Test InteractableToggleCollection CurrentIndex updates

    Declaration
    public IEnumerator TestInteractableToggleCollectionIndexUpdate()
    Returns
    Type Description
    IEnumerator

    TestPressableToggleHoloLens2()

    Tests that the toggle button states consistently return to original state after subsequent clicks (front plate does not move back after every click).

    Declaration
    public IEnumerator TestPressableToggleHoloLens2()
    Returns
    Type Description
    IEnumerator

    TestPressableToggleMotionController()

    Tests that the toggle button states consistently return to original state after subsequent motion controller clicks (front plate does not move back after every click).

    Declaration
    public IEnumerator TestPressableToggleMotionController()
    Returns
    Type Description
    IEnumerator

    TestRadialSetPrefab()

    Tests that radial buttons can be selected and deselected, and that a radial button set allows just one button to be selected at a time

    Declaration
    public IEnumerator TestRadialSetPrefab()
    Returns
    Type Description
    IEnumerator

    TestResetOnDestroy()

    Instantiates a runtime assembled Interactable with ResetOnDestroy property true and destroy the Interactable component.

    Declaration
    public IEnumerator TestResetOnDestroy()
    Returns
    Type Description
    IEnumerator

    TestSelectGlobalInput()

    Instantiates a push button prefab and uses simulated global input events to press it. Test that global input behaves correctly when Interactable IsEnabled and not

    Declaration
    public IEnumerator TestSelectGlobalInput()
    Returns
    Type Description
    IEnumerator

    TestTouchInput()

    Test touch input on Interactable by looking at state changes, both for when IsEnabled and not

    Declaration
    public IEnumerator TestTouchInput()
    Returns
    Type Description
    IEnumerator

    TestTriggerOnClick()

    Test the TriggerOnClick API for Interactable both when IsEnabled and not. Button should fire OnClick and move UI

    Declaration
    public IEnumerator TestTriggerOnClick()
    Returns
    Type Description
    IEnumerator

    TestVoiceInputOnPrefab()

    Instantiates a push button prefab and uses simulated voice input events to press it, both when IsEnabled and not

    Declaration
    public IEnumerator TestVoiceInputOnPrefab()
    Returns
    Type Description
    IEnumerator
    Back to top Generated by DocFX