We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

    Show / Hide Table of Contents

    Class PlayModeTestUtilities

    Inheritance
    Object
    PlayModeTestUtilities
    Inherited Members
    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 PlayModeTestUtilities

    Methods

    EnsureInputModule()

    Make sure there is a MixedRealityInputModule on the main camera, which is needed for using Unity UI with MRTK.

    Declaration
    public static void EnsureInputModule()
    Remarks

    Workaround for #5061

    GenerateHandPose(ArticulatedHandPose.GestureId, Handedness, Vector3, Quaternion)

    Declaration
    public static SimulatedHandData.HandJointDataGenerator GenerateHandPose(ArticulatedHandPose.GestureId gesture, Handedness handedness, Vector3 worldPosition, Quaternion rotation)
    Parameters
    Type Name Description
    ArticulatedHandPose.GestureId gesture
    Handedness handedness
    Vector3 worldPosition
    Quaternion rotation
    Returns
    Type Description
    SimulatedHandData.HandJointDataGenerator

    GetInputSimulationService()

    Utility function to simplify code for getting access to the running InputSimulationService

    Declaration
    public static InputSimulationService GetInputSimulationService()
    Returns
    Type Description
    InputSimulationService

    Returns InputSimulationService registered for playmode test scene

    GetInputSystem()

    Declaration
    public static IMixedRealityInputSystem GetInputSystem()
    Returns
    Type Description
    IMixedRealityInputSystem

    GetPointer<T>(Handedness)

    Declaration
    public static T GetPointer<T>(Handedness handedness)
        where T : class, IMixedRealityPointer
    Parameters
    Type Name Description
    Handedness handedness
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    PopHandSimulationProfile()

    Declaration
    public static void PopHandSimulationProfile()

    PushHandSimulationProfile()

    Declaration
    public static void PushHandSimulationProfile()

    Setup()

    Creates a play mode test scene, creates an MRTK instance, initializes playspace.

    Declaration
    public static void Setup()

    TearDown()

    Destroys all objects in the play mode test scene, if it has been loaded, and shuts down MRTK instance.

    Declaration
    public static void TearDown()

    TeardownInputModule()

    Destroy the input module to ensure it gets initialized cleanly for the next test.

    Declaration
    public static void TeardownInputModule()
    Remarks

    Workaround for #5116

    Back to top Generated by DocFX