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.