Coder Social home page Coder Social logo

jia-xiaodong / unitymobileinput Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mopsicus/umi

0.0 1.0 0.0 672 KB

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

License: MIT License

Java 27.16% Objective-C 2.88% Objective-C++ 20.47% C# 49.48%

unitymobileinput's Introduction

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)

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
  5. 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)

unitymobileinput's People

Contributors

mopsicus avatar mops avatar soprachevak avatar filipvajgand avatar bgamepoint avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.