Unity Mobile Input Plugin for iOS and Android (Unity UI Toolkit compatible). This is a refactor of the original plugin to allow it to work in UI Toolkit.
Add this as a submodule in git and then initialise the projects git submodules
- Native input field and keyboard on iOS and Android
- Hiding additional mobile input box (Android)
- Show "Done", "Clear" buttons (iOS)
- Return button type: Default, Next, Done, Search, Send
- Detect keyboard show/hide (with height)
- Custom fonts support
- Copy the files into your existing unity project asset folder
- Make empty Gameobject and attach
Plugins
to your new GameObject - Attach
MobileInputField
script to your Unity UIInputField
object - For more options set
ContentType
toCustom
to yourInputField
object - For
Android
make sure yourAndroidManifest.xml
has the following setting
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name">
...
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
...
</activity>
- To prevent screen slide up on
Android
when keyboard show, add this option to yourAndroidManifest.xml
<activity ... android:windowSoftInputMode="adjustNothing">
...
</activity>
- Copy font TTF to StreamingAssets folder
- Input font name in property instead "default"
- You are cool
Open Demo scene and build, to try how it works
JSON library for C# is NiceJson (https://github.com/AngelQuirogaM/NiceJson)