Coder Social home page Coder Social logo

nostek / unitynativeeditbox Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 5.0 1005 KB

A native implementation of text input boxes on iOS and Android for Unity

License: MIT License

Java 18.34% C# 17.38% Objective-C++ 21.58% ShaderLab 36.38% HLSL 6.33%
unity inputfield edittext uitextfield ios android

unitynativeeditbox's People

Contributors

nostek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unitynativeeditbox's Issues

Advice on Inputfield "interactable" property

I haved an unstable behavior on NativeEditBox plugin on Android device mostly cases.. ( cant select the text at certain character or when click back button the new text typed disappeared )

After a deep debugging, I noticed that any change on the runtime, the property "interactable", disabled the calls of native input fields. So basically I created a function that force the destroy calls of the plugin and when the OnPointerClick events is called, the CreateNow functions refresh all native events.

just reference:
image

and the call .. something like this:
image

The config on NativeEditBox have switchBetweenNativeAndUnity set true
this is tested on Unity v2020.2.2f1 on Android device.

thnks for the great job on this plugin.

editbox can't visible

in android, when i click the inputfield and show the keyboard, sometime the editbox can't visible, and then ,close the keyboard, the editbox become normal.

Native Edit Box: creation/destruction of the native field is delayed on one frame

Hello !

I'm using the plugin and I noticed that there is a kind of blink when I'm disabling and enabling the native edit boxes.
There is below an example, which I took from my app at 3 following frames.

Frame 1:

Frame 2:

Frame 3:

I'm not using the functionality "Switch Between Native" because there is also a blink when focusing/defocusing the field. I think the delay/blink comes from the native call to Destroy(), that is not handle at the same time as the Unity onDisable() function on the input field.

To fix this issue, I tried to :

  • remove all the delays from scripts (WaitForEndOfFrame/WaitForFixedUpdate) so the native calls can be made the quickest possible
  • Prioritize the plugin script execution order (-800)
  • Drop down the framerate from 60 fps to 30 fps
  • Move the input field out of the canvas before its destruction and show it when it had time to load on the side

I'm currently using Unity 2020.3.0f1.
Is there a way to correct this problem in a proper way and avoid this delayed frame ?

Thank you for your help.

Can't set focus on native control or trigger action after pressing Return

Not being able to set the focus on the native edit field (at least I couldn't find a way) is a real shame - you often expect to just start typing. It would be very useful to be able to trigger an action when clicking the Return button.

Apologies if I shouldn't have posted this here.

Otherwise it's a good addition.

Set focus to next editBox

When Return button type is set to next, it dosent set focus to net EditBox. This is tested on Android phone

How to apply scrolls?

I want to make the input field scrollable but I don't know how to do it.

Of course, it already has a weak(?) scroll ability, but it is too slow, has no scroll bar, and maybe has no inertia...

Could you help me about this problem?

I'd appreciate your help.

Text is tiny

I tried using this with TextMesh Pro, and the text appears tiny (like a few pixels high, completely not readable). I am seeing a value of 0.174418598 as the pixelsPerUnit size, so my size 15 text ends up being sent to setFontSize as a very small number.

Do you have any thoughts as to the correct way to address this?

Close Keyboard on Return?

Hello,

Firstly thanks for providing this; and apologies if I've managed to miss the workaround for this!

I noticed you included the option to change the "Return Button Type" however the button doesn't seem to work whilst in use, so I have to tap outside of the keyboard for it to close. Any suggestions around this?

I'm using Unity 2017.2.1f1 If that makes any difference, I did attempt to use a plugin similar to this in which the option to assign an event to the "Return" was provided and worked however this one didn't fix the performance bug I was encountering (https://github.com/YousicianGit/UnityNativeEdit) (https://issuetracker.unity3d.com/issues/android-application-lag-terribly-when-returning-from-input-field-slash-soft-keyboard-entry-on-android). This plugin however works great just the little issue I noted above.

Many thanks!

Dark background on Inputfield MultiLine Content Config

Hi,

Thnks for the great pluging.
Im testing on iOS an multiple entry on inputfield. but when get the focus on inputfield, the background turns "dark" color (black). But when unfocus the field, the background turns previous color. (white)

On the NativeEditBox config, the checkbox "Switch Between Native and Unity " is actived

This issues not happens on Single Line config.
nativebox_issue

thanks.

Destroy more than 1 NativeEditBox

Hi,
I saw your Android project, of native editbox, i tried to create 3 or 4 inputfields in unity, it is generating 4 nativeeditbox, but how to destroy if i want to destroy anyone or all or one by one .

I can't add my own InputField class

I don't know why but i can't add my own InputField class (It's called UpgradedInputField) because NativeEditBox.cs can't see it. Actually it can't see any class i write (Sorry for my bad english)
Edit: I just moved scripts where /plugin/NativeEditBox to my Scripts folder and now it can see my other scripts

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.