Click or drag to resize

TouchManager Class

A facade object to configure and hold parameters for an instance of ITouchManager. Contains constants used throughout the library.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          TouchScript.CoreDebuggableMonoBehaviour
            TouchScriptTouchManager

Namespace:  TouchScript
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public sealed class TouchManager : DebuggableMonoBehaviour

The TouchManager type exposes the following members.

Constructors
  NameDescription
Public methodTouchManager
Initializes a new instance of the TouchManager class
Top
Properties
  NameDescription
Public propertyDebugMode
Gets or sets if this object should show its debug information.
(Inherited from DebuggableMonoBehaviour.)
Public propertyDisplayDevice
Gets or sets current display device.
Public propertyStatic memberInstance
Gets the instance of ITouchManager implementation used in the application.
Public propertySendMessageEvents
Gets or sets the bit-mask which indicates which events from an instance of ITouchManager are sent as Unity messages.
Public propertySendMessageTarget
Gets or sets the SendMessage target GameObject.
Public propertyShouldCreateCameraLayer
Indicates if TouchScript should create a CameraLayer for you if no layers present in a scene.
Public propertyShouldCreateStandardInput
Gets or sets a value indicating whether a StandardInput should be created in scene if no inputs present.
Public propertyUseSendMessage
Gets or sets a value indicating whether Unity messages are sent when ITouchManager dispatches events.
Public propertyUseUnityEvents
Gets or sets a value indicating whether Unity Events should be used.
Top
Methods
  NameDescription
Public methodStatic memberIsInvalidPosition
Determines whether a Vector2 represents an invalid position, i.e. if it is equal to INVALID_POSITION.
Top
Fields
  NameDescription
Public fieldStatic memberCM_TO_INCH
Centimeter to inch ratio to be used in DPI calculations.
Public fieldStatic memberINCH_TO_CM
Inch to centimeter ratio to be used in DPI calculations.
Public fieldStatic memberINVALID_POSITION
The value used to represent an unknown state of a screen position. Use IsInvalidPosition(Vector2) to check if a point has unknown value.
Public fieldOnFrameFinish
Occurs when a frame is finished. After all other events.
Public fieldOnFrameStart
Occurs when a new frame is started before all other events.
Public fieldOnPointersAdd
Occurs when new hovering pointers are added.
Public fieldOnPointersCancel
Occurs when pointers are cancelled.
Public fieldOnPointersPress
Occurs when pointers touch the surface.
Public fieldOnPointersRelease
Occurs when pointers are released.
Public fieldOnPointersRemove
Occurs when pointers are removed from the system.
Public fieldOnPointersUpdate
Occurs when pointers are updated.
Public fieldStatic memberVERSION
TouchScript version.
Public fieldStatic memberVERSION_SUFFIX
TouchScript version suffix.
Top
Remarks

An instance of TouchManager may be added to a Unity scene to hold (i.e. serialize them to the scene) parameters needed to configure an instance of ITouchManager used in application. Which can be accessed via Instance static property.

Though it's not required it is a convenient way to configure TouchScript for your scene. You can use different configuration options for different scenes.

See Also