Skip to content

Instantly share code, notes, and snippets.

View xiaodong2077's full-sized avatar

Xiaodong Huang xiaodong2077

  • MercuryNavi
  • Guangzhou, China
  • 20:20 (UTC +08:00)
View GitHub Profile
@ditzel
ditzel / ScrollAndPinch.cs
Created July 22, 2019 17:12
Pinch and Scroll to Move and Zoom in Unity for Mobile Games
/*
Set this on an empty game object positioned at (0,0,0) and attach your active camera.
The script only runs on mobile devices or the remote app.
*/
using UnityEngine;
class ScrollAndPinch : MonoBehaviour