开源软件名称(OpenSource Name): mopsicus/UnityMobileInput开源软件地址(OpenSource Url): https://github.com/mopsicus/UnityMobileInput开源编程语言(OpenSource Language):
C#
49.2%
开源软件介绍(OpenSource Introduction):
UnityMobileInput
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 )
Installation
Add url https://github.com/mopsicus/UnityMobileInput.git
to Package Manager, or add the following line to Packages/manifest.json: "ru.mopsicus.mobileinput": "https://github.com/mopsicus/UnityMobileInput.git"
Features
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
How to use
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 UI InputField
object
For more options set ContentType
to Custom
to your InputField
object
For Android
make sure your AndroidManifest.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 your AndroidManifest.xml
<activity ... android : windowSoftInputMode =" adjustNothing" >
...
</activity >
How to use custom fonts
Copy font TTF to StreamingAssets folder
Input font name in property instead "default"
You are cool
Demo
Open Demo scene and build, to try how it works
Example
Etc
JSON library for C# is NiceJson (https://github.com/AngelQuirogaM/NiceJson )
请发表评论