Unity Mobile Input Plugin for iOS and Android (Unity UI compatible)
You can use default InputField UI component on iOS and Android without additional field
above keyboard
It's deep refactor and bug fix of UnityNativeEdit (https://github.com/kmbang/UnityNativeEdit)
- 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
- 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>
Open Demo scene and build, to try how it works
JSON library for C# is NiceJson (https://github.com/AngelQuirogaM/NiceJson)