3
1

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.

InputFieldで日本語を入力する際にOnValueChangedが一気に呼ばれる問題をUniRxで対応してみた

Posted at

##環境
Unity2019.3.3f1

##どんなことが起こったか
InputFieldに日本語を打つと以下のgifの様にOnValueChangedが呼ばれてしまう。
oneFrame.gif

##対策
同一フレームに発火されたイベントの最後だけを通したいのでThrottleFrameを使用すれば想定通りの挙動になった。

m_InputField.OnValueChangedAsObservable().ThrottleFrame(1)

fix.gif

####参考
https://qiita.com/toRisouP/items/3cf1c9be3c37e7609a2f

3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?