0
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?

Is Focusableとかいうやつの正体

Posted at

↓こいつの正体が判明したのでメモ

image.png

Is Focusableって?

Is FocusableはボタンとかスライダーとかいわゆるインタラクティブなUIについている機能。
デフォルトではTrue。
特に意識していなかったこいつに苦しめられることになる

何が起きるか

Windows系UE開発者だとあるあるだと思うが「UI操作」+「キーボード入力」+「マウス入力」をすべて行うなんてことはざらだと思う
が、このIs Focusableとかいうやつ

直前にマウスで操作されたUIにフォーカスを写し、フォーカスが解除されるまで他の入力を吸う

という挙動をするのである。なんてこったい

何が起きるのかというと

ボタンなどをクリック

WASD移動系操作をキーボード入力

フォーカスがUIに吸われているのでUIを操作したか?の判定が優先され、本来したかった移動とかに入力が入らない!

ということが起きる。(正確かどうかは知らない)

「UI操作」+「キーボード入力」+「マウス入力」みたいな操作を実装したい場合、Is FocusableをインタラクティブなUIは全部オフにしておく必要がある。気をつけろ!

ちなみにInput Modeは関与しない。関与しないったらしない。何のモードだろうとこの現象が起きる。

0
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
0
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?