Documentation

Unity Engine

Download Unity

Unity Engine

isDirectManipulationDevice

Whether the event comes from a direct-manipulation device, such as a touchscreen or a pen.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.UICommonModule
public bool isDirectManipulationDevice { get; }

Remarks

With a direct manipulation device, the user touches the elements they interact with, without a cursor in between. This value is true when Event.pointerType is PointerType.Touch or PointerType.Pen.
Use this property to adapt an interaction that relies on a cursor. For example, the Editor color picker starts its eyedropper on press rather than on release and samples the color while the user drags, because no cursor hovers over the screen to sample from.