Version: 2023.1
public Vector2 delta ;

描述

与上次事件相比该鼠标的相对移动。

using UnityEngine;

public class Example : MonoBehaviour { // Move the scroll wheel to determine // the X & Y scrolling amount. void OnGUI() { Event e = Event.current; if (e.isMouse) { Debug.Log(e.delta); } } }