Editar

Compartir a través de


InputSimulationService Class

Definition

Service that provides simulated mixed reality input information based on mouse and keyboard input in editor

public ref class InputSimulationService : Microsoft::MixedReality::Toolkit::Input::BaseInputSimulationService, IDisposable, Microsoft::MixedReality::Toolkit::IMixedRealityCapabilityCheck, Microsoft::MixedReality::Toolkit::Input::IInputSimulationService, Microsoft::MixedReality::Toolkit::Input::IMixedRealityEyeGazeDataProvider
[Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor, "Input Simulation Service", "Profiles/DefaultMixedRealityInputSimulationProfile.asset", "MixedRealityToolkit.SDK", true)]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/input-simulation/input-simulation-service")]
public class InputSimulationService : Microsoft.MixedReality.Toolkit.Input.BaseInputSimulationService, IDisposable, Microsoft.MixedReality.Toolkit.IMixedRealityCapabilityCheck, Microsoft.MixedReality.Toolkit.Input.IInputSimulationService, Microsoft.MixedReality.Toolkit.Input.IMixedRealityEyeGazeDataProvider
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/input-simulation/input-simulation-service")]
[Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor, "Input Simulation Service", "Profiles/DefaultMixedRealityInputSimulationProfile.asset", "MixedRealityToolkit.SDK", true, Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.LegacyXR | Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.XRSDK)]
public class InputSimulationService : Microsoft.MixedReality.Toolkit.Input.BaseInputSimulationService, IDisposable, Microsoft.MixedReality.Toolkit.IMixedRealityCapabilityCheck, Microsoft.MixedReality.Toolkit.Input.IInputSimulationService, Microsoft.MixedReality.Toolkit.Input.IMixedRealityEyeGazeDataProvider
[<Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor, "Input Simulation Service", "Profiles/DefaultMixedRealityInputSimulationProfile.asset", "MixedRealityToolkit.SDK", true)>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/input-simulation/input-simulation-service")>]
type InputSimulationService = class
    inherit BaseInputSimulationService
    interface IInputSimulationService
    interface IMixedRealityInputDeviceManager
    interface IMixedRealityDataProvider
    interface IMixedRealityService
    interface IDisposable
    interface IMixedRealityEyeGazeDataProvider
    interface IMixedRealityCapabilityCheck
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/input-simulation/input-simulation-service")>]
[<Microsoft.MixedReality.Toolkit.MixedRealityDataProvider(typeof(Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSystem), Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor, "Input Simulation Service", "Profiles/DefaultMixedRealityInputSimulationProfile.asset", "MixedRealityToolkit.SDK", true, Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.LegacyXR | Microsoft.MixedReality.Toolkit.Utilities.SupportedUnityXRPipelines.XRSDK)>]
type InputSimulationService = class
    inherit BaseInputSimulationService
    interface IInputSimulationService
    interface IMixedRealityInputDeviceManager
    interface IMixedRealityDataProvider
    interface IMixedRealityService
    interface IDisposable
    interface IMixedRealityEyeGazeDataProvider
    interface IMixedRealityCapabilityCheck
Public Class InputSimulationService
Inherits BaseInputSimulationService
Implements IDisposable, IInputSimulationService, IMixedRealityCapabilityCheck, IMixedRealityEyeGazeDataProvider
Inheritance
Attributes
MixedRealityDataProviderAttribute UnityEngine.HelpURLAttribute
Implements

Constructors

InputSimulationService(IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)

Constructor.

InputSimulationService(IMixedRealityServiceRegistrar, IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Obsolete.

Constructor.

Fields

DefaultPriority (Inherited from BaseService)
disposed

Value indicating if the object has completed disposal.

(Inherited from BaseService)

Properties

ConfigurationProfile

The configuration profile for the service.

(Inherited from BaseService)
ControllerPositionLeft

Position of the left controller in view space.

ControllerPositionRight

Position of the right controller in view space.

ControllerRotationLeft

Rotation euler angles of the left controller in view space.

ControllerRotationRight

Rotation euler angles of the right controller in view space.

ControllerSimulationMode

Simulated controller behavior.

EnablePointerCache

Control mechanism to enable/disable use of Pointer Cache in request/recycling of pointers by Input System

(Inherited from BaseInputDeviceManager)
EyeGazeSimulationMode

Simulated eye gaze behavior.

HandDataLeft

Pose data for the left hand.

HandDataRight

Pose data for the right hand.

HandPositionLeft
Obsolete.

Position of the left hand in view space.

HandPositionRight
Obsolete.

Position of the right hand in view space.

HandRotationLeft
Obsolete.

Rotation euler angles of the left hand in view space.

HandRotationRight
Obsolete.

Rotation euler angles of the right hand in view space.

HandSimulationMode
Obsolete.

Simulated hand behavior.

InputSimulationProfile

Typed representation of the ConfigurationProfile property.

InputSystemProfile

The input system configuration profile in use in the application.

(Inherited from BaseInputDeviceManager)
IsAlwaysVisibleControllerLeft

The left controller is always tracking.

IsAlwaysVisibleControllerRight

The right controller is always tracking.

IsAlwaysVisibleHandLeft
Obsolete.

The left hand is always tracking.

IsAlwaysVisibleHandRight
Obsolete.

The right hand is always tracking.

IsEnabled

Indicates whether or not the service is currently enabled.

(Inherited from BaseService)
IsInitialized

Indicates whether or not the service has been initialized.

(Inherited from BaseService)
IsMarkedDestroyed

Indicates whether or not the Destroy method been called on this service.

(Inherited from BaseService)
IsSimulatingControllerLeft

The left controller is controlled by user input.

IsSimulatingControllerRight

The right controller is controlled by user input.

IsSimulatingHandLeft
Obsolete.

The left hand is controlled by user input.

IsSimulatingHandRight
Obsolete.

The right hand is controlled by user input.

MotionControllerDataLeft

Pose data for the left motion controller.

MotionControllerDataRight

Pose data for the right motion controller.

Name

Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.

(Inherited from BaseService)
Priority

Optional Priority to reorder registered managers based on their respective priority, reduces the risk of race conditions by prioritizing the order in which managers are evaluated.

(Inherited from BaseService)
Registrar
Obsolete.

The service registrar instance that registered this service.

(Inherited from BaseDataProvider<T>)
Service

The service instance to which this provider is providing data.

(Inherited from BaseDataProvider<T>)
SimulateEyePosition
Obsolete.

If true then camera forward direction is used to simulate eye tracking data.

UserInputEnabled

If true then keyboard and mouse input are used to simulate controllers.

Methods

CheckCapability(MixedRealityCapability)

Checks to see if one or more registered data providers supports the requested capability on the current platform.

Destroy()

Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.

Disable()

Optional Disable function to pause the service.

Dispose()

Cleanup resources used by this object.

(Inherited from BaseService)
Dispose(Boolean)

Cleanup resources used by the object

(Inherited from BaseService)
Enable()

Optional Enable function to enable / re-enable the service.

GetActiveControllers()

Retrieve all controllers currently registered with this device at runtime (if direct access is required)

(Inherited from BaseInputSimulationService)
GetControllerDevice(Handedness) (Inherited from BaseInputSimulationService)
GetHandDevice(Handedness)
Obsolete.
(Inherited from BaseInputSimulationService)
GetOrAddControllerDevice(Handedness, ControllerSimulationMode) (Inherited from BaseInputSimulationService)
GetOrAddHandDevice(Handedness, ControllerSimulationMode)
Obsolete.
(Inherited from BaseInputSimulationService)
Initialize()

The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.

LateUpdate()

Optional LateUpdate function to that is called after Update has been called on all services.

RecyclePointers(IMixedRealityInputSource)

Recycle all pointers associated with the provided IMixedRealityInputSource. This involves reseting the pointer, disabling the pointer GameObject, and possibly caching it for re-use.

(Inherited from BaseInputDeviceManager)
RemoveAllControllerDevices() (Inherited from BaseInputSimulationService)
RemoveAllHandDevices()
Obsolete.
(Inherited from BaseInputSimulationService)
RemoveControllerDevice(Handedness) (Inherited from BaseInputSimulationService)
RemoveHandDevice(Handedness)
Obsolete.
(Inherited from BaseInputSimulationService)
RequestPointers(SupportedControllerType, Handedness)

Request an array of pointers for the controller type.

(Inherited from BaseInputDeviceManager)
Reset()

Optional Reset function to perform that will Reset the service, for example, whenever there is a profile change.

(Inherited from BaseService)
ResetControllerLeft()

Reset the left controller.

ResetControllerRight()

Reset the right controller.

ResetHandLeft()
Obsolete.

Reset the left hand.

ResetHandRight()
Obsolete.

Reset the right hand.

Update()

Optional Update function to perform per-frame updates of the service.

UpdateControllerDevice(ControllerSimulationMode, Handedness, Object) (Inherited from BaseInputSimulationService)
UpdateHandDevice(ControllerSimulationMode, Handedness, SimulatedHandData)
Obsolete.
(Inherited from BaseInputSimulationService)

Explicit Interface Implementations

IMixedRealityEyeGazeDataProvider.SaccadeProvider System.Object.Microsoft#MixedReality#Toolkit#Input#IMixedRealityEyeGazeDataProvider#SaccadeProvider
IMixedRealityEyeGazeDataProvider.SmoothEyeTracking System.Object.Microsoft#MixedReality#Toolkit#Input#IMixedRealityEyeGazeDataProvider#SmoothEyeTracking

Applies to