Input.compositionCursorPos 组合鼠标位置

static var compositionCursorPos : Vector2

Description描述

The current text input position used by IMEs to open windows.

当前文本输入位置,使用于IME来打开窗口。

Some language IMEs such as Japanese will open windows while the user is typing text, to aid the user in picking the correct input strings. These windows are expected to pop up at the current cursor position, so the IME needs to know where input is displayed. When using Unity's built in GUI system for text input, Unity will take care of setting the cursor position for the IME. However, if you wish to implement your own GUI for text input, you need to set this to the current text input position for IME windows to show up correctly.

某些语言IME,例如日语,在用户输入文本时,将打开窗口,以帮助用户选择正确的输入字符串。这些窗口在当前光标位置弹出,因此输入法需要知道在哪里显示输入。当使用Unity内置GUI系统为文本输入,Untiy将考虑为IME设置鼠标位置。然而,如果想要实现你自己的图像用户界面用来文本输入,必须设置这个到当前文本输入位置,为使IME窗口正确显示。

参见:Input.imeCompositionMode, Input.compositionString

Page last updated: 2011-10-6