Virtual keyboard with Chinese Input Method Editor(IME)
Mingchong LI
$0.0
(no ratings)
Date |
Price |
---|---|
Date |
Price($) |
09/03(2024) |
0.0 |
11/23(2024) |
0.0 |
Jump AssetStore
The package contains a virtual keyboard that supports English, Chinese, numbers, and special characters input. For Chinese input, it supports the Pinyin input method.To be used in VR scene, VR plugin is needed, such as Meta XR All-in-One SDKundefinedMain UsageChinese fonts are needed. My recommendation is Noto, which is free.Text Mesh Pro is compulsory.[Optional] If you want to generate a new Chinese dictionary:A Chinese word list under the Python directory, named wordfreq.txt, formatted as [Chinese word]\t[frequency].pip install pinyin and run cn_parser.py.Open Unity Editor, click Tools > Construct Py Prefab to open the generator, input the Chinese word list and hash txt path, and click generate to get the prefab.For example, if the list you generated is Assets\WPinyin\Dictionary\PinyinWords-words.json, then input Assets\WPinyin\Dictionary\PinyinWords.You can also select how many words you need in the list. The words will be selected based on frequency, with high-frequency words having higher priorities.Open the KeyBoard prefab, drag the word prefab you just generated onto the pyCode field.[Optional] If you want to generate a new English word dictionary:An English word list under the Python directory, named en_freq.txt, with a title in the first line, formatted as [Word]\t[PoS]\t[Freq].Run en_parser.py.Code UsageTo set the target input field: KeyBoardManager.SetTargetField(TMP_InputField target).To refresh and add input field focus listener: KeyBoardManager.GetAllInputFields().Meta dataAuthor: Mingchong Li (email me)Date: 10/8/2024Version: 0.3English Input: By inputting the initial characters, related words will be generated as candidates and sorted by frequency.Chinese Input: By inputting partial letters (such as "nh" or "nhao"), the corresponding candidates (such as "ni hao") will be generated and sorted by frequency. To retrieve Chinese word candidates, which may number in the hundreds, they are loaded asynchronously.Special Characters and Numbers Input: To input numbers, users can press the "123" button to get the number keyboard. Then, press "#+=" to access the full keyboard of special characters.Virtual Keyboard: The virtual keyboard uses UGUI buttons, making it compatible with basic scenes and VR scenes.Sample Scenes: Includes a sample scene for testing the keyboard and Input Method (IM) and a scene for testing the keyboard in a VR environment.Dictionary Parser: Parses Chinese and English words and generates dictionaries for Unity use.Dictionary Importer: Imports dictionaries using a Unity Editor tool.