Class PlayModeTestUtilities
Inherited Members
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