• Stars
    star
    326
  • Rank 125,117 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created about 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unity mobile Input plugin for iOS and Android (Unity UI compatible)

GitHub license GitHub issues Maintenance

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

  1. Native input field and keyboard on iOS and Android
  2. Hiding additional mobile input box (Android)
  3. Show "Done", "Clear" buttons (iOS)
  4. Return button type: Default, Next, Done, Search, Send
  5. Detect keyboard show/hide (with height)
  6. Custom fonts support

How to use

  1. Copy the files into your existing unity project asset folder
  2. Make empty Gameobject and attach Plugins to your new GameObject
  3. Attach MobileInputField script to your Unity UI InputField object
  4. For more options set ContentType to Custom to your InputField object
  5. 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>
  1. 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

  1. Copy font TTF to StreamingAssets folder
  2. Input font name in property instead "default"
  3. You are cool

Demo

Open Demo scene and build, to try how it works

Example

UnityMobileInput Andorid demo

Etc

JSON library for C# is NiceJson (https://github.com/AngelQuirogaM/NiceJson)

More Repositories

1

infinite-scroll-unity

Infinite Scroll is a script extension that allows you to use ScrollRect control as an infinite spinner. It is fast, simple and mobile-friendly way to make lists with thousands of rows.
C#
366
star
2

unity-build-pipeline

Custom BASH script for build, archive, export and upload APK and IPA to server with Telegram notification
Shell
76
star
3

unity-keyboard-hack

Hack for hiding mobile input box on Android
C#
47
star
4

unity-ios-background-run

Little iOS plugin for Unity to work app in background
C#
40
star
5

unity-ios-ipv6-ready

Simple example how to connect to server by socket in Unity. Ready for IPv6 and AppStore review.
C#
25
star
6

native-android-camera-unity

Example for getting images from Android device via Unity plugin
Java
23
star
7

unity-ios-localization

Unity post-build scripts for iOS localization and frameworks adding
C#
22
star
8

unity-ssl

Simple example, how to to use SSL with sockets in Unity C#
C#
14
star
9

unity-bezier-curves

Simple C# script for draw Bezier curves in Unity
C#
14
star
10

unity-twin-slider

Simple twin slider based on Unity UI sliders
C#
13
star
11

unity-tabs-view

Simple tabs controller for Unity UI
C#
13
star
12

unity-crop-scale-texture

Simple utils to crop and scale Texture2D in Unity app
C#
12
star
13

unity-clickable-text

Example how to make http links in text via TextMeshPro in Unity
C#
11
star
14

unity-share-plugin-ios-android

Unity share plugins for iOS and Android with sources.
C++
10
star
15

ubb

Telegram bot for build Unity projects
JavaScript
9
star
16

modi

Lightweight IoC container for Unity
C#
8
star
17

ubh

Unity helper for Unity Builder Bot
C#
7
star
18

unity-plugins-system

Simple Unity plugin system for Android and iOS
ShaderLab
6
star
19

native-ios-browser-unity

Example for show browser and load url on iOS device via Unity plugin
Objective-C++
4
star
20

unity-blur-effect

Example how to use 2 cameras at one time to blur effect in Unity
C#
3
star
21

unity-team-fight

Simple example to show how make team fight between two teams on limited field with pathfinding
ShaderLab
2
star
22

snake-unity-ecs

Simple Unity snake game on ECS
C#
2
star
23

unity-send-mail-plugin

Simple iOS & Android plugin for sending mail from Unity app.
Objective-C++
2
star
24

unity-http-multiple-download

Simple C# class for download files in Unity.
C#
1
star
25

unity-ios-3dtouch-fix

Temporary solve for iOS 3DTouch issue in Unity
C#
1
star
26

ubh-demo

Demo project for Unity Builder Helper
1
star