1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【UnityEditor拡張】ドラッグ操作を反映されないようにする

Posted at

概要

ドラッグ操作の値は取得するが、そのまま移動量を反映させたくなかったり、移動量に変更を加えたりする時に使う。

やり方

public void HogeFunc()
{
    var ev = Event.current;
    if(ev.type == EventType.MouseDrag)
    {
        ev.delta = Vector3.zero;
    }
}

event.deltasetも可能なので、ここで設定すればドラッグ量が伝わります。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?