TouchManager Class |
Namespace: TouchScript
public sealed class TouchManager : DebuggableMonoBehaviour
The TouchManager type exposes the following members.
Name | Description | |
---|---|---|
TouchManager | Initializes a new instance of the TouchManager class |
Name | Description | |
---|---|---|
DebugMode |
Gets or sets if this object should show its debug information.
(Inherited from DebuggableMonoBehaviour.) | |
DisplayDevice |
Gets or sets current display device.
| |
Instance |
Gets the instance of ITouchManager implementation used in the application.
| |
SendMessageEvents |
Gets or sets the bit-mask which indicates which events from an instance of ITouchManager are sent as Unity messages.
| |
SendMessageTarget |
Gets or sets the SendMessage target GameObject.
| |
ShouldCreateCameraLayer |
Indicates if TouchScript should create a CameraLayer for you if no layers present in a scene.
| |
ShouldCreateStandardInput |
Gets or sets a value indicating whether a StandardInput should be created in scene if no inputs present.
| |
UseSendMessage |
Gets or sets a value indicating whether Unity messages are sent when ITouchManager dispatches events.
| |
UseUnityEvents |
Gets or sets a value indicating whether Unity Events should be used.
|
Name | Description | |
---|---|---|
IsInvalidPosition |
Determines whether a Vector2 represents an invalid position, i.e. if it is equal to INVALID_POSITION.
|
Name | Description | |
---|---|---|
CM_TO_INCH |
Centimeter to inch ratio to be used in DPI calculations.
| |
INCH_TO_CM |
Inch to centimeter ratio to be used in DPI calculations.
| |
INVALID_POSITION |
The value used to represent an unknown state of a screen position. Use IsInvalidPosition(Vector2) to check if a point has unknown value.
| |
OnFrameFinish |
Occurs when a frame is finished. After all other events.
| |
OnFrameStart |
Occurs when a new frame is started before all other events.
| |
OnPointersAdd |
Occurs when new hovering pointers are added.
| |
OnPointersCancel |
Occurs when pointers are cancelled.
| |
OnPointersPress |
Occurs when pointers touch the surface.
| |
OnPointersRelease |
Occurs when pointers are released.
| |
OnPointersRemove |
Occurs when pointers are removed from the system.
| |
OnPointersUpdate |
Occurs when pointers are updated.
| |
VERSION |
TouchScript version.
| |
VERSION_SUFFIX |
TouchScript version suffix.
|
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.