Created
June 9, 2021 06:00
-
-
Save cacapon/b9e209c88e566f0bab065c066794dc98 to your computer and use it in GitHub Desktop.
タッチ入力関連の処理のメモ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class TouchEventTest : MonoBehaviour, IPointerDownHandler, IPointerUpHandler //Interfaceを追加 | |
{ | |
public void OnPointerDown(PointerEventData eventData) | |
{ | |
//オブジェクトをクリック、指でタップしたときに呼ばれる | |
} | |
public void OnPointerUp(PointerEventData eventData) | |
{ | |
//オブジェクトを離したときに呼ばれる | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment