Releases: TouchScript/TouchScript
TouchScript 9.0
This release has a lot of changed APIs, so upgrading from a previous version might be hard.
Minimum supported Unity version: 5.6.0
CHANGES
- Added: Settings window (Window > TouchScript > Settings) with links to docs and script defines.
- Added: Proper Unity UI support, see Photos example.
- Added: Unity Events support.
- Added: StandardLayer which replaces UI, 3D and 2D layers.
- Added: Scroll wheel support.
- Added: Pressure and Rotation properties for pen and touch pointers.
- Added: Basic and Advanced views to most components. Basic view only shows most important parameters.
- Added: A possibility to set transforms to exclusively receive input with LayerManager.SetExclusive() API.
- Added: OverHelper component for handling hover/out events.
- Added: Ability turn off emulated mouse in mouse input.
- Added: Smoothing to Transformer.
- Added: New editor interface for components.
- Added: Pointer.Buttons to be able to detect which buttons of the controller are pressed and released.
- Added: Pointer.GetOverData() which returns TouchHit for whatever is under the pointer.
- Added: Pointer.Flags (right now FLAG_ARTIFICIAL, FLAG_RETURNED and FLAG_INTERNAL are implemented).
- Added: Exit on ESC and automated adding scenes to Build Settings for examples.
- Added: EditorResources to handle editor-only images.
- Added: Different pointer types support to Cursor Manager (was Pointer Visualizer), cursor gradients are now customizable.
- Added: Debug mode to record pointers in editor and player.
- Added: Profiler markers throughout the code base.
- Added: Recognized gestures can now be cancelled.
- Added: Icons to scripts.
- Changed: Windows 7/8/10 touch handling is moved to a C++ plugin, fixing crashes on quit.
- Changed: Mouse fake pointer is now created right when ALT+PRESS happens and not the next frame after ALT+RELEASE. The former method was triggering unnecessary taps and was interfering with other gestures.
- Changed: By default StandardLayer now raycasts everything.
- Changed: Moved TouchScript.prefab and Cursors.prefab into Prefabs folder from Examples folder.
- Removed: UIGesture, UICameraLayer, UIOverlayLayer, CameraLayer, CameraLayer2D. Use StandardLayer instead.
- Removed: MouseInput and MobileInput, use StandardInput instead.
- Removed: Tags.
- Removed: WebPlayer from the code base.
FIXES
- Fixed: Layer list on TouchManager not updating in play mode.
- Fixed: Using nonalloc API for CameraLayer and CameraLayer2D functionality in StandardInput.
- Fixed: Defines for 5.4+.
- Fixed: All pointers now are reset even if no pointers were updated.
- Fixed: TouchScriptInputModule and EventSystem initialization order.
- Fixed: Windows input not initializing if Unity window was in background while starting the app.
- Fixed: Dependency on VC++ redistributable in Windows builds.
- Fixed: Dependency on GetPointerInfo Windows 8 API in WindowsTouch.dll.
- Fixed: Windows 8 pen interaction.
- Fixed: Windows issue with wrong input values when resolution changes.
- Fixed: Occasional frozen touches on Windows.
- Fixed: An issue with multi-finger gestures failing.
- Fixed: Visualization of multiple fingers.
- Fixed: TapGesture erroneously triggering because of a redispatched touch from 2+ point gestures.
- Fixed: Layer initialization order. Giving one more frame before we create a StandardLayer if no layers present.
- Fixed: Warnings and errors in in 5.5, 5.6 and 2017.1.
- Fixed: Issues with simultaneous usage of mouse and touch for Windows 7 / Unity touch inputs.
- Fixed: Interaction with UI Masks.
- Fixed: Mouse scroll value not resetting when no scroll occurs.
- Fixed: Delta values in Transform Gestures not resetting after Changed event.
- Fixed: Standard Layer ticking UI when UI recognition is disabled.
- Fixed: Issues with Time.timeScale = 0.
- Fixed: Gesture dispatch performance in transforms hierarchy (it's much faster now, yey!).
- Fixed: DPI calculations.
- Fixed: Issues with debug cursors in builds.
- Fixed: A rare null pointer exception in LongPressGesture.
- Fixed: Transformer not working with other components modifying object's TRS.
- Fixed: UI events processing — updates are no longer processed if not over a UI element, or not pressed a UI element.
IMPORTANT API CHANGES:
- Renamed: touch to pointer in the whole code base.
- Added: 4 types of pointers: Touch, Mouse, Pen, Object.
- Added: Idle state to gestures which is active until gesture started recognizing the sequence (at this point it goes to Possible).
- Changed: Now instead of Began, Moved, Ended, Cancelled pointer events there are Added, Pressed, Updated, Released, Removed and Cancelled events to work with hovering pointers like mouse.
- Removed: ITouchManager.GetHitTarget API. This functionality is replaced by IPointer.GetOverData, PointerUtils.IsPointerOnTarget.
API CHANGES
- Added: IPointer interface. LayerDelegate, TouchLayer, HitTest accept IPointer instead of Pointer.
- Added: PressedPointers and PressedPointersCount since (Active)Pointers now contain hovering pointers and need to be differentiated from pressed pointers.
- Added: Pools to mouse and pen handlers since when cancelled and returned touches must be different. I.e mouse has a pool of 1 object.
- Added: Pointer.CopyFrom.
- Added: Pointers are now created with a reference to the input source they belong to.
- Added: ITransformGesture.TransformMask with set flags for what actually changed.
- Added: TouchScriptInputModule.IsPointerOverGameObject implementation.
- Changed: MouseHandler, TouchHandler, Win*TouchHandler now have CoordinatesRemapper property and do remapping themselves via the remapper passed from StandardInput.
- Changed: All *PointerDelegate to PointerDelegate: addPointer, updatePointer and others now accept just a Pointer object. All input sources must update relevant touch parameters themselves before calling updatePointer.
- Changed: Touch/Mouse/Windows handlers are now IInputSource and manage their pointers themselves.
- Changed: ObjectPool now requires a function which creates elements.
- Changed: Transform gestures namespace and hierarchy.
- Changed: Transformer.smoothingFactor max to 100000.
- Changed: Gesture.ScreenPosition now returns activePointers[0].Position.
- Moved: Layer registration logic to LayerManager.
- Moved: CombineTouches functionality from Gesture to TapGesture since it is the only place it is used.
- Moved: Pointer class to Pointers namespace.
- Moved: Pointer Target, Hit, Layer to TouchHit structure obtainable through GetPressData().
- Moved: Pointer cache logic to inputs.
- Merged: ObjectHitResult and LayerHitResult into HitResult.
- Renamed: ActivePointers to Pointers, NumberOfPointers to PointersCount.
- Renamed: TouchHit.Transform to Target.
- Renamed: Gesture.ScreenPositionHitData to GetScreenPositionHitData().
- Renamed: TouchHit.PointerHitType to HitType.
- Renamed: TouchHit to HitData.
- Renamed: Gesture.ScreenPosition to ScreenPositionHit.
- Renamed: Clusters to Clusters2D.
- Renamed: TouchScript.Debug namespace to TouchScript.DebugUtils.
- Removed: Gesture.GetTargetHitResult, added Gesture.ScreenPositionHit property.
- Removed: HitResult.Error.
- Removed: One overload of ITouchManager.GetHitTarget.
- Removed: ITransformGesture.ApplyTransform, Transformer component now applies changes itself.
TouchScript 9.0 ALPHA 3
This is a preview release of upcoming changes.
This release has a lot of changed APIs, so upgrading from a previous version might be hard.
Please check 9.0 ALPHA 1 release notes.
Minimum supported Unity version: 5.3.6
CHANGES
- Added: TouchScriptInputModule.IsPointerOverGameObject implementation.
FIXES
- Fixed: warnings in 5.5.
- Fixed: a dependency on GetPointerInfo Windows 8 API in WindowsTouch.dll.
TouchScript 8.3
Minimum Unity version: 5.1
- Fixed: warnings in 5.6
TouchScript 9.0 ALPHA 2
This is a preview release of upcoming changes.
This release has a lot of changed APIs, so upgrading from a previous version might be hard.
Please check 9.0 ALPHA 1 release notes.
Minimum supported Unity version: 5.3.6
CHANGES
- Added: Settings window with links to docs and define checkboxes.
- Added: EditorResources to handle editor-only images.
- Added: Unity Events support.
- Added: New editor interface for components.
- Changed: Mouse fake pointer is now created right when ALT+PRESS happens and not the next frame after ALT+RELEASE. The former method was triggering unnecessary taps and was interfering with other gestures.
- Changed: By default StandardLayer now raycasts everything.
- Changed: Transformer.smoothingFactor max to 100000.
- Removed: WebPlayer from the code base.
FIXES
- Fixed: the dependency on VC++ redistributable in Windows builds.
- Fixed: An issue with multi-finger gestures failing.
- Fixed: Visualization of multiple fingers.
- Fixed: TapGesture erroneously triggering because of a redispatched touch from 2+ point gestures.
- Fixed: layer initialization order. Giving one more frame before we create a StandardLayer if no layers present.
TouchScript 9.0 ALPHA 1
This is a preview release of upcoming changes.
This release has a lot of changed APIs, so upgrading from a previous version might be hard.
Minimum supported Unity version: 5.3.6
CHANGES
- Added: StandardLayer which replaces UI, 3D and 2D layers.
- Added: Proper Unity UI support, see Photos example.
- Added: Scroll wheel support.
- Added: Pointer.Buttons to be able to detect which buttons of the controller are pressed and released.
- Added: Pointer.GetOverData() which returns TouchHit for whatever is under the pointer.
- Added: Pointer.Flags (right now FLAG_ARTIFICIAL and FLAG_RETURNED are implemented).
- Added: OverHelper component for handling hover/out events.
- Added: You can now turn off emulated mouse in mouse input.
- Added: Smoothing to Transformer.
- Added: Exit on ESC and automated adding scenes to Build Settings for examples.
- Changed: Windows 7/8/10 touch handling is moved to a C++ plugin, fixing crashes on quit.
- Removed: UIGesture, UICameraLayer, UIOverlayLayer, CameraLayer, CameraLayer2D. Use StandardLayer instead.
- Removed: MouseInput and MobileInput, use StandardInput instead.
- Removed: Tags.
FIXES
- Fixed: Layer list on TouchManager not updating in play mode.
- Fixed: Using nonalloc API for CameraLayer and CameraLayer2D functionality in StandardInput.
- Fixed: Defines for 5.4+.
- Fixed: All pointers now are reset even if no points were updated.
- Fixed: TouchScriptInputModule and EventSystem initialization order.
- Fixed: Windows input not initializing if Unity window was in background while starting the app.
IMPORTANT API CHANGES:
- Renamed: touch to pointer in the whole code base.
- Added: 4 types of pointers: Touch, Mouse, Pen, Object.
- Added: Idle state to gestures which is active until gesture started recognizing the sequence (at this point it goes to Possible).
- Changed: Now instead of Began, Moved, Ended, Cancelled pointer events there are Added, Pressed, Updated, Released, Removed and Cancelled events to work with hovering pointers like mouse.
- Removed: ITouchManager.GetHitTarget API. This functionality is replaced by IPointer.GetOverData, PointerUtils.IsPointerOnTarget.
API CHANGES
- Added: IPointer interface. LayerDelegate, TouchLayer, HitTest accept IPointer instead of Pointer.
- Added: PressedPointers and PressedPointersCount since (Active)Pointers now contain hovering pointers and need to be differentiated from pressed pointers.
- Added: Pools to mouse and pen handlers since when cancelled and returned touches must be different. I.e mouse has a pool of 1 object.
- Added: Pointer.CopyFrom.
- Added: Pointers are now created with a reference to the input source they belong to.
- Added: ITransformGesture.TransformMask with set flags for what actually changed.
- Changed: MouseHandler, TouchHandler, Win*TouchHandler now have CoordinatesRemapper property and do remapping themselves via the remapper passed from StandardInput.
- Changed: All *PointerDelegate to PointerDelegate: addPointer, updatePointer and others now accept just a Pointer object. All input sources must update relevant touch parameters themselves before calling updatePointer.
- Changed: Touch/Mouse/Windows handlers are now IInputSource and manage their pointers themselves.
- Changed: ObjectPool now requires a function which creates elements.
- Changed: Transform gestures namespace and hierarchy.
- Moved: Pointer class to Pointers namespace.
- Moved: Pointer Target, Hit, Layer to TouchHit structure obtainable through GetPressData().
- Moved: Pointer cache logic to inputs.
- Merged: ObjectHitResult and LayerHitResult into HitResult.
- Renamed: ActivePointers to Pointers, NumberOfPointers to PointersCount.
- Renamed: TouchHit.Transform to Target.
- Renamed: Gesture.ScreenPositionHitData to GetScreenPositionHitData().
- Renamed: TouchHit.PointerHitType to HitType.
- Renamed: TouchHit to HitData.
- Renamed: Gesture.ScreenPosition to ScreenPositionHit.
- Renamed: Clusters to Clusters2D.
- Renamed: TouchScript.Debug namespace to TouchScript.DebugUtils.
- Removed: Gesture.GetTargetHitResult, added Gesture.ScreenPositionHit property.
- Removed: HitResult.Error.
- Removed: One overload of ITouchManager.GetHitTarget.
- Removed: ITransformGesture.ApplyTransform, Transformer component now applies changes itself.
TouchScript 8.2
Minimum Unity version: 5.1.
- Fixed: Unity 5.4 API changes.
- Fixed: Incorrect sorting order of hit objects in CameraLayer2D.
- Fixed: Min/Max touches in Gesture editor.
- Fixed: Touch visualizer not resetting properly if ShowTouchID and ShowTags are checked off.
- Added: LayerMask to UILayer.
TouchScript 8.1
Minimum Unity version: 5.1.
- Fixed: A typo in Transform gestures internally accessing ActiveTouches property instead of activeTouches.
- Fixed: Shader error in 5.3.
- Fixed: Manually cancelled touches being readded.
- Added: Protected members to docs, removed descriptions of inherited Unity methods.
- Added: SceneManager instead of Application API in 5.3.
TouchScript 8.0
Minimum Unity version 5.1.
This update fixes a couple of issues introduced with TouchScript 7.0. Please upgrade. Some scripts change might be required.
- Reverted: Added back lists from TouchScript 6.x to touch event handlers because this change resulted in unpredictable order when gestures are recognizing (issue #203).
- Changed: Taps scene doesn't use main camera anymore for it to be easier copy-pastable (issue #205).
- Fixed: Layer ordering issues.
- Updated: Build scripts.
- Removed: Playmaker support.
TouchScript 7.1
Minimum Unity version 5.1.
- Added: Touch layers now can be turned off individually, they are not removed from TouchManager when disabled not to lose ordering.
- Fixed: Gestures are properly reset when manually disabled (issue #199). When disabled instead of changing state to Failed gestures now change state to Cancelled.
- Fixed: TUIOInput and TUIO libraries are now compiled only in editor, standalone, ios and android to prevent issues with other platforms.
- Fixed: Layer ordering in TouchManager properties.
- Fixed: Merged Windows touch crash fix from 0cc4f07 (issue #200).
- Fixed: Warnings in examples.
- Changed: Docs template and built-in docs links.
TouchScript 7.0
Minimum Unity version 5.1.
7.0 is a significant change, your existing projects will break.
Please read upgrade guide at https://github.com/TouchScript/TouchScript/wiki/Upgrading.
- The library is now distributed in source code instead of DLLs.
- Added: UILayer which allows gestures to work on UI elements without any colliders.
- Added: UIGesture to route enter/exit/down/up/click events from TouchScript to UI elements (otherwise buttons and other interactive elements won't react on touch events).
- Added: StandardInput which handles mouse, mobile touch and windows touch input and replaces MouseInput, MobileInput and Windows(7/8)TouchInput. No changes or scripts are now required to set a valid input source on all platforms.
- Added: Windows touch input now handles screen resolution and scaling correctly.
- Added: More extensible layer projection handling with introduced ProjectionParams class.
- Added: OnEnable for all Layers to be able to turn them off.
- Added: Delegate to TouchLayer which can prevent a layer from detecting a touch.
- Added: Global delegate to GestureManager with an example showing how to code an exclusive gesture.
- Added: TouchPoint now has a property with an Input Source which created this touch.
- Added: HelpURL attributes to MonoBehaviours which link to online docs.
- Added: Resharper settings to repository.
- Changed: TouchManager and GestureManager now send began, moved, ended and cancelled events with individual touches instead of List.
- Changed: TouchHit is now a struct, removed ITouchHit, ITouchHit2D and ITouchHit3D. If you have code using this struct please consult API docs: http://touchscript.github.io/docs/html/T_TouchScript_Hit_TouchHit.htm
- Changed: TouchPoint.Hit now isn't updated realtime, it always returns the first hit. Use TouchManager.Instance.GetHitTarget(touch.position, out hit) to get hit data every frame.
- Changed: InputSources now register themselves to TouchManager which calls UpdateInput on them before processing touches. This way synchronous InputSources are guaranteed to execute the same frame actual touch processing is scheduled.
- Changed: If no input is found an instance of StandardInput is created unless this behavior is specifically turned off.
- Changed: When a touch is cancelled and returned a new ID is assigned to it and inputs should handle that correctly.
- Changed: Refactored gesture adding API. Layers now don't overwrite their order when they add themselves to the manager.
- Changed: TouchLayer default name is now "Layer".
- Changed: Continuous gestures return unused touches to the system when ended if no other continuous gestures use these touches.
- Changed: Transform and Pinned Transform gestures check if they have enough touches only on first movement.
- Changed: Transform gestures now execute their logic at the end of frame.
- Changed: When disabling gestures can now change state only to Failed.
- Changed: Gestures now use the first touch point's layer in GetHitTarget method.
- Changed: Tags are now immutable and are not shared within touch points.
- Changed: Refactored TouchDebugger to TouchVisualizer which now uses Unity UI and is more customizable.
- Changed: DEBUG define to TOUCHSCRIPT_DEBUG.
- Removed: ITouch interface. Now all code works with TouchPoint.
- Removed: PanGesture, RotateGesture, ScaleGesture, corresponding Simple* gestures and Transformer2D. Use TransformGesture and Transformer components instead.
- Removed: Layer.ProjectTo, added GetProjectionParams instead. Use ProjectionUtils.Project with layer's projectionParams to project points.
- Removed: FullscreenTarget.
- Removed: Scaleform support. Autodesk gave up on Unity integration long ago.
- Fixed: Awake/OnEnable methods on layers executing in editor mode and creating objects into editor scene.
- Fixed: Added singleton code from TouchManagerInstance to GestureManagerInstance to prevent possible behavior from issue #136.
- Fixed: A few null pointer exceptions.