Pinchable ScrollRect

FREE
Publisher LokoSolo Games
File size 250.06kB
Number of files 12
Latest version 1.0.7
Latest release date 2023-07-18 07:25:15
First release date 2022-02-17 07:06:14
Supported Unity versions 2018.4.2 or higher

Features

  • Customizable pinching behaviour with inherited Unity ScrollRect behaviour.
  • Overridden OnScroll behaviour for mouse scroll to perform zooming behaviour.
  • Customized pinching gesture to perform the same zooming behaviour as mouse scroll input for touches.
  • Transformed standard Unity Event IPointerUp & IPointerDown interface into IPinch interface for further customization of touch behaviour.

Getting Started

  • Use it same as the way you use the Unity ScrollRect component.
  • Add a UI/ScrollView from the GameObject Menu
  • Select the ScrollRect added, click on the context dropdown menu
  • Select "Replace as Pinchable"

Important Remarks

  • Without PinchInputDetector, the ScrollRect can still perform zooming with mouse scroll input but not touch input.
  • The absolute minimum scale of the Content of the ScrollRect is 1. A customizable lower bound and upper bound of the scale can be set on inspector.
  • Any third touches detected after pinching will be ignore, even after both pinching touches are lifted.

UPM Package

Also available on: GitHub / OpenUPM

Top Publisher Assets