Search Unity

Advanced Input Field

Discussion in 'Assets and Asset Store' started by fennecx_development, Jul 29, 2017.

  1. Diorion

    Diorion

    Joined:
    Mar 25, 2017
    Posts:
    8

    i got some screen shots for you, are these pictures helpful?
     

    Attached Files:

  2. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Ah, I think I know what happening. Another user reported a similar error before.

    I think the only place it can throw that error is here: (Scripts/Helper/Util.cs)


    You probably deleted the Main Camera in your scene, so this reference is null.
    To fix it you can try replacing the "Camera.main" with a reference to your main camera (the one that is being used for Canvas rendering).

    I'll add a note to my TODO list, so I won't forget to add a safety check there.
     
  3. Diorion

    Diorion

    Joined:
    Mar 25, 2017
    Posts:
    8
    I changed my camera's tag from "untagged" to "MainCamera" and it works! Thank you, but now i have a few more questions , sorry for being so annoying :p . i added a function onEndEdit, but even when i don't press the "done" button , and i just press outside the keyboard , on my canvas , still calls this function.How can i avoid that?I want to call one function when "done" is pressed and when i deselect input field call another function.
     
  4. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    It's the way that event is meant to work. Every time something is causing the end of edit mode it will call it.
    You have to check the "EndEditReason" parameter to determine what caused the ending of edit mode and use that to determine which of your other methods you need to call.
     
  5. Diorion

    Diorion

    Joined:
    Mar 25, 2017
    Posts:
    8
    I cant find the point in which you determine the "EndEditReason" parameter in your "form" demo scene so i'm getting a little confused, can you guide me through?
     
  6. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    The parameter isn't really used in that form scene example, but basically if you have registered a method with signature (string result, EndEditReason reason).

    You would then handle the event callback like this:
    Code (CSharp):
    1. public void OnInputEnd(string result, EndEditReason reason)
    2. {
    3.     switch(reason)
    4.     {
    5.         case EndEditReason.DESELECT: OnUserDeselect(); break;
    6.         case EndEditReason.KEYBOARD_CANCEL: OnUserKeyboardCancel(); break;
    7.         case EndEditReason.KEYBOARD_DONE: OnUserKeyboardDone(); break;
    8.         case EndEditReason.KEYBOARD_NEXT: OnUserKeyboardNext(); break;
    9.     }
    10. }
    11.  
    12. public void OnUserDeselect()
    13. {
    14.     Debug.Log("User deselected the input field");
    15. }
    16.  
    17. public void OnUserKeyboardCancel()
    18. {
    19.     Debug.Log("User cancelled keyboard input");
    20. }
    21.  
    22. public void OnUserKeyboardDone()
    23. {
    24.     Debug.Log("User pressed done key on keyboard");
    25. }
    26.  
    27. public void OnUserKeyboardNext()
    28. {
    29.     Debug.Log("User pressed next key on keyboard (and next inputfield will be selected)");
    30. }
    Hopefully this is more clear.
     
  7. Diorion

    Diorion

    Joined:
    Mar 25, 2017
    Posts:
    8
    Yes it is, thank you very much!!!!
     
  8. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    Hello! what im trying to do is select an advanced input field and deselected it , through a button click.I figured out how to select and deselect the input field, but when i deselect it , my keyboard stays visible.Is there any way so i can hide the keyboard after a button click?
     
  9. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I didn't expose the internal deselect functionality yet, so I quickly made a new method that does the deselect correctly (tested on Android device):
    In AdvancedInputField.cs (in Plugins/Advanced Input Field/Scripts/InputField directory) add the following method:
    Code (CSharp):
    1. /// <summary>Manually deselects this inputfield (call this to select this inputfield programmatically)</summary>
    2. public void ManualDeselect(EndEditReason endEditReason = EndEditReason.DESELECT)
    3. {
    4.     if(initialized)
    5.     {
    6.         Deselect(endEditReason);
    7.     }
    8.     else
    9.     {
    10.         Debug.LogErrorFormat("InputField not yet initialized, please wait until it's ready");
    11.     }
    12. }
    Then in your button click callback methods you can use the methods of the AdvancedInputField instance like this:
    Code (CSharp):
    1. public void OnSelectInputFieldClick()
    2. {
    3.     inputField.ManualSelect();
    4. }
    5.  
    6. public void OnDeselectInputFieldClick()
    7. {
    8.     inputField.ManualDeselect();
    9. }
    I'll include this deselect method in the next release.
     
  10. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    Yes it worked!Thanks for that, great support.
     
  11. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    So now, i've come up with another issue.I created a "reply to" scene, so i want if user clicks on a button, a specific input field needs to be selected.I have "START OF TEXT" choice on caret on begin enum, for this input field. The problem is that , my input field behavior is like i have selected "END OF TEXT" on caret on begin enum. Did i do something wrong, or i need to change something?
     
  12. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Ah I see, I forgot to change that method after adding that property:
    The following should work:
    Change the method "ManualSelect()" in AdvancedInputField.cs (in Plugins/Advanced Input Field/Scripts/InputField directory) like this:
    Code (CSharp):
    1. /// <summary>Manually selects this inputfield (call this to select this inputfield programmatically)</summary>
    2. public void ManualSelect(BeginEditReason beginEditReason = BeginEditReason.PROGRAMMATIC_SELECT)
    3. {
    4.     if(initialized)
    5.     {
    6.         this.beginEditReason = beginEditReason;
    7.         Reselect();
    8.         EnableSelection();
    9.         switch(caretOnBeginEdit)
    10.         {
    11.             case CaretOnBeginEdit.START_OF_TEXT: textNavigator.MoveToStart(); break;
    12.             case CaretOnBeginEdit.END_OF_TEXT: textNavigator.MoveToEnd(); break;
    13.             default: textNavigator.MoveToEnd(); break;
    14.         }
    15.         textInputHandler.Process();
    16.     }
    17.     else
    18.     {
    19.         Debug.LogErrorFormat("InputField not yet initialized, please wait until it's ready");
    20.     }
    21. }
     
  13. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    Hi, I have just purchased this plugin. I noticed there is an issue with android app that is having full screen disable. The touch screen keyboard can only been brought up once, and it stay invisible not matter how many times I tap on the input field. Haven't tested on iOS.
    Code (CSharp):
    1.     private void Start() {
    2.         Screen.fullScreen = false;
    3.     }
     
    Last edited: May 14, 2018
  14. katov_mike

    katov_mike

    Joined:
    Feb 14, 2016
    Posts:
    2
    Hello, jpienbro!
    It's really great plugin, but I found some issues.
    Issue 1 (critical). Keyboard does not appear in ios if checkbox "Player settings / Splash image / Show splash screen" is disabled.
    Issue 2. Cursor position is wrong if TextField Alignment is Center or Right (try to press BackSpace at the end of the text or Delete at the begining).

    Temp solution: subscribe to OnValueChanged and do
    Code (CSharp):
    1. EmailInput.CaretPosition = EmailInput.CaretPosition;
    Issue 3. KeyboardScroller works wrong if Canvas RenderMode == ScreenSpaceOverlay. How to fix: replace GetNormalizedVertical function with this:
    Code (CSharp):
    1. private void GetNormalizedVertical(RectTransform rectTransform, out float normalizedY, out float normalizedHeight)
    2. {
    3.    Vector3[] corners = new Vector3[4];
    4.    rectTransform.GetWorldCorners(corners);
    5.  
    6.    float bottomY = corners[1].y;
    7.    float cameraSize = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? Screen.height / 2 : camera.orthographicSize;
    8.    normalizedY = (bottomY + cameraSize) / (cameraSize * 2);
    9.    normalizedY -= normalizedOffsetY;
    10.    normalizedY -= (canvas.renderMode == RenderMode.ScreenSpaceOverlay ? .5f : 0f);
    11.  
    12.    Vector2 size = new Vector2(Mathf.Abs(corners[3].x - corners[1].x), Mathf.Abs(corners[3].y - corners[1].y));
    13.    normalizedHeight = size.y / (cameraSize * 2);
    14. }
    Tested with Unity 2017.3.1p4
    Hope you can fix the first issue.
     
    Last edited: May 17, 2018
  15. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    What part of the screen are you using for the Unity app?
    I think the check for keyboard height might give issues if the Unity app doesn't have the bottom area of the device screen available. I'll look into it.
     
  16. katov_mike

    katov_mike

    Joined:
    Feb 14, 2016
    Posts:
    2
    Issue 4. ... Never mind, my mistake.
     
    Last edited: May 15, 2018
  17. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    I disabled full screen for my app because I need the navigation bar on android, the app is still using the entire screen with native resolution of the device.

    To reproduce the issue:
    1. Using the Form scene from you samples.
    2. insert
    Code (CSharp):
    1. Screen.fullScreen = false;
    in Awake() or Start() to any of your active Monobehaviour object in the scene.
    3. Build the project and run it on an Android device.
    4. Tap on any input field to bring up the touchscreen keyboard, and then touch the background area to hide it.
    5. And then, the touchscreen keyboard can't be brought up again when you tap on input field.
     
  18. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thank you for the more detailed steps to reproduce ;)
     
  19. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Unfortunately couldn't reproduce this behaviour on my test devices. Two of my devices have hardware navigation buttons, but the one with onscreen navigation controls doesn't have this issue either.

    What is your test device and what Unity version are you using? Maybe it's related to that.
    Also could you check if there is any error in the log of the device when this issue occurs?
     
  20. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    I'm sorry, I should've provided those info earlier.

    Unity Version: 2017.4.1f1
    Android Version: 8.1.0
    Device: Nexus 6P

    I have also built the android project with Multiline scene and full screen disabled, and the issue remained.

    Regarding the log, I'm sorry that I don't know how to use adb, and I have no android native development experience.
     
    Last edited: May 15, 2018
  21. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Hmm... I'm using the same Unity version, so it's probably related to the device or android version.
    I'll try to find a secondhand/refurbished Nexus 6P, so I can test here myself. I currently only have Samsung Android devices here, so it would be better anyways to have test devices of other manufacturers ;).
     
  22. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    Hmm... Can you please download my test project here? Then build on android see if the issue occurs?

    [Update]:
    I borrowed a galaxy S8+ device with Android 7.0 and built my test project on the device, and I found the issue remain. So I doubt the issue is dependent on device.

    My test project is pretty much a blank 2D project with Advanced Inputfield imported, and I inserted
    Code (CSharp):
    1. Screen.fullScreen = false;
    into the Start method of MultilineControl.cs.
     
    Last edited: May 15, 2018
  23. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Build and tested on Galaxy S7 and it works fine on that device. I think it might happen on "newer" smartphones which use an onscreen navigation bar instead of hardware buttons.
    My test devices all have hardware buttons for navigation, except an old Samsung tablet that always keeps that bar visible (even in fullscreen mode).
     
    MrSaoish likes this.
  24. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    Ahhh... I think that's highly possible.

    [Update]:
    I have borrowed a galaxy S6 (with hardware navigation buttons). And the issue isn't on that device. So I think you are right, the issue pretty much would happen on newer devices that are using virtual navigation buttons with full screen disabled. Furthermore, on those devices with full screen enable, the touch screen keyboard could be brought up as desired, but the screen would be shaken a bit when the keyboard got brought up.
     
    Last edited: May 16, 2018
  25. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thank you for confirming.
    I'll buy/order a refurbished Nexus 6P then (I could find one for a reasonable price), so I can test properly.
     
    MrSaoish likes this.
  26. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    Sorry if I am asking too many questions. I want to continue working on the project with the plugin while awaiting for jpienbro to fix the non-full screen mode touch screen keyboard awakening issue on virtual navigation bar devices.

    I want to use the feature "Hold: Select word + show ActionBar (if enabled)". I am trying to let user holding on an empty input field so they could paste input. Could you please tell me where to enable this feature? Thanks!
     
    Last edited: May 17, 2018
  27. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    It doesn't work by default in an empty inputfield, but I've modified it so it works in an empty inputfield too.
    You can apply attached patch package to latest version of the plugin (1.5.5).

    Hold the (empty) inputfield for 3 seconds and the paste command should appear.
    As with the other ActionBar options you first need to enable the ActionBar option on the AdvancedInputField instance itself (in the Inspector).
     

    Attached Files:

    MrSaoish likes this.
  28. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    This is great. I am trying to make the input field experience as close to the android native one as possible, and with the update patch, the plugin almost work like native one except for one thing: user need to tap on the input field first before holding can be registered. Is it possible to allow user to just hold on the input field then trigger the action bar.
     
    Last edited: May 18, 2018
  29. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I'll see what's possible.
    Usually the way Unity's EventSystem and Selectable classes work make these kind of behaviours more difficult to implement, but I'll see if I can find a workaround that works nicely with the other input events too.
     
    MrSaoish likes this.
  30. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Just to let you know:
    Unfortunately the integration of emoji support in the plugin is on hold at the moment. I've encountered a bug in the TextMeshPro that blocks me from getting the correct character indexes when using emojis (or other surrogate pairs).
    I've reported the issue to the developer of TextMeshPro.
    See: https://forum.unity.com/threads/tmp...rong-value-when-using-surrogate-pairs.531430/
     
  31. Airship

    Airship

    Joined:
    Sep 10, 2011
    Posts:
    260
    Is it possible to preview the action bar in Editor?
     
  32. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    No, not at the moment at least.
    Scripts for mobile are currently only compiled when building for a mobile platform.
     
  33. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I have a Nexus 6P now and could test it with fullscreen disabled. I've managed to reproduce and fix the issue. The offset at the bottom caused by the onscreen navigation bar wasn't getting handled properly.

    This should fix the issue:
    Replace the NativeKeyboard.aar file in "Assets/Plugins/Android" with the one in attached rar file.
     

    Attached Files:

    MrSaoish likes this.
  34. MrSaoish

    MrSaoish

    Joined:
    Oct 1, 2016
    Posts:
    22
    That's awesome! Thank you!
     
  35. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    Hello,i have an advanced input field in which is pre-filled ,e.g : "MyAdvancedInputfield.Text="MyText",when i start my scene.But when i run the scene, the field shows the whole string except the last character, e.g:"MyTex", and shows the whole string only when the input field is selected.Do you have any ideas on why this is happening?
     
  36. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    By prefilled do you mean you have the value is set in the inspector or that you set the .Text property on runtime in Awake() , Start() or other Initialization method?
    It might be that the input field is not fully initialized yet (should print a warning in the log) when modifying it too early (for example in Awake()). At least if you were modifying it on runtime. Otherwise only the character limit property and text bounds should have an effect on it. Does it matter how long the string is?
     
  37. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    You are right, inputfield wasn't fully initialized yet, sorry for bugging you!
     
  38. poshaughnessey

    poshaughnessey

    Joined:
    Jul 12, 2012
    Posts:
    45
    I added Advanced Input Field to my project today, and changed one field to use the Advanced Input Field. It works fine in Editor, but on Android, it immediately crashes as soon as a prefab is constructed that contains an Advanced Input Field. We are using Unity 2017.3.1p1.

    Code (CSharp):
    1. 06-06 15:46:28.836: E/CRASH(8490): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
    2. 06-06 15:46:28.836: E/CRASH(8490): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. 06-06 15:46:28.836: E/CRASH(8490): Build fingerprint: 'samsung/dreamqltesq/dreamqltesq:7.0/NRD90M/G950USQU1AQK3:user/release-keys'
    4. 06-06 15:46:28.836: E/CRASH(8490): Revision: '12'
    5. 06-06 15:46:28.836: E/CRASH(8490): pid: 8490, tid: 8504, name: UnityMain  >>> com.***** <<<
    6. 06-06 15:46:28.836: E/CRASH(8490):     r0 00000000  r1 000008ac  r2 00000001  r3 d0ca1908
    7. 06-06 15:46:28.836: E/CRASH(8490):     r4 c89e6d68  r5 e70fe2dc  r6 e70fe1f0  r7 00000000
    8. 06-06 15:46:28.836: E/CRASH(8490):     r8 c8f95238  r9 00000008  sl 00000008  fp e70fdb50
    9. 06-06 15:46:28.836: E/CRASH(8490):     ip e70fdb50  sp e70fdb50  lr d0ca1908  pc c745a2e4  cpsr efc5fd10
    10. 06-06 15:46:28.836: E/CRASH(8490): backtrace:
    11. 06-06 15:46:28.837: E/CRASH(8490):     #00  pc 0000d2e4   ( AdvancedInputFieldPlugin.Util:DetermineThumbSize (UnityEngine.Camera) {0xc61c72b0} + 0x8c (0xc745a258 0xc745a438) [0xcf6aee40 - Unity Root Domain]+53988)
    12. 06-06 15:46:28.837: E/CRASH(8490):     #01  pc 00521904  [anon:libc_malloc]
    13. 06-06 15:46:28.837: E/CRASH(8490): stack:
    14. 06-06 15:46:28.837: E/CRASH(8490):          e70fdb10  e70fdb74
    15. 06-06 15:46:28.837: E/CRASH(8490):          e70fdb14  cf89d8c8  /data/app/com.****-2/lib/arm/libmonobdwgc-2.0.so (mono_magic_trampoline+144)
    16. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb18  00000438
    17. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb1c  00000438
    18. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb20  00000001
    19. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb24  d0ca1908  [anon:libc_malloc]
    20. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb28  c89e6d68
    21. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb2c  e70fe2dc
    22. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb30  e70fe1f0
    23. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb34  00000000
    24. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb38  c8f95238  [anon:libc_malloc]
    25. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb3c  00000008
    26. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb40  00000008
    27. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb44  e70fdb50
    28. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb48  e70fdb50
    29. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb4c  c745a2c4
    30. 06-06 15:46:28.838: E/CRASH(8490):     #00  e70fdb50  c8f95238  [anon:libc_malloc]
    31. 06-06 15:46:28.838: E/CRASH(8490):          ........  ........
    32. 06-06 15:46:28.838: E/CRASH(8490):     #01  e70fdb50  c8f95238  [anon:libc_malloc]
    33. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb54  cd30dc94
    34. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb58  e7000100
    35. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb5c  cfa1deac  /data/app/com.***-2/lib/arm/libmonobdwgc-2.0.so (mono_thread_force_interruption_checkpoint_noraise+16)
    36. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb60  40a49596  /dev/ashmem/dalvik-main space 1_745_745 (deleted)
    37. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb64  3ef914c2  /dev/ashmem/dalvik-main space 1_745_745 (deleted)
    38. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb68  c6273118  [anon:libc_malloc]
    39. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb6c  cf091718
    40. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb70  0000002c
    41. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb74  cf0df3d8
    42. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb78  c89e6d68
    43. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb7c  e70fe2dc
    44. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb80  e70fe1f0
    45. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb84  cc133dc8  [anon:libc_malloc]
    46. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb88  c6273210  [anon:libc_malloc]
    47. 06-06 15:46:28.838: E/CRASH(8490):          e70fdb8c  00000008
    48. 06-06 15:46:28.838: E/CRASH(8490): code around pc:
    49. 06-06 15:46:28.838: E/CRASH(8490):     c745a2c4 ed9b2b18 ee000a10 eeb80ac0 eeb73ac0  .+...........:..
    50. 06-06 15:46:28.838: E/CRASH(8490):     c745a2d4 ee822b03 eeb70bc2 ed8b0a05 e1a00007  .+..............
    51. 06-06 15:46:28.838: E/CRASH(8490):     c745a2e4 e5d7e000 eb000070 ee020a10 eeb72ac2  ....p........*..
    52. 06-06 15:46:28.838: E/CRASH(8490):     c745a2f4 e303e220 e34ce627 ed9e3a00 eeb73ac3   ...'.L..:...:..
    53. 06-06 15:46:28.838: E/CRASH(8490):     c745a304 ee222b03 eeb70bc2 ed8b0a06 e303e228  .+".........(...
    54. 06-06 15:46:28.838: E/CRASH(8490):     c745a314 e34ce627 ed9e2a00 eeb72ac2 ed9b0a04  '.L..*...*......
    55. 06-06 15:46:28.839: E/CRASH(8490):     c745a324 eeb73ac0 ee822b03 eeb70bc2 ed8b0a07  .:...+..........
    56. 06-06 15:46:28.839: E/CRASH(8490):     c745a334 eb000048 ee000a10 eeb80ac0 eeb73ac0  H............:..
    57. 06-06 15:46:28.839: E/CRASH(8490):     c745a344 e303e230 e34ce627 ed9e2a00 eeb72ac2  0...'.L..*...*..
    58. 06-06 15:46:28.839: E/CRASH(8490):     c745a354 eeb70bc3 ed8d0a00 e59d0000 eeb70bc2  ................
    59. 06-06 15:46:28.839: E/CRASH(8490):     c745a364 ed8d0a00 e59d1000 eb000037 ee020a10  ........7.......
    60. 06-06 15:46:28.839: E/CRASH(8490):     c745a374 eeb72ac2 ed8b2b16 eb000030 ee000a10  .*...+..0.......
    61. 06-06 15:46:28.839: E/CRASH(8490):     c745a384 eeb80ac0 eeb73ac0 e303e238 e34ce627  .....:..8...'.L.
    62. 06-06 15:46:28.839: E/CRASH(8490):     c745a394 ed9e2a00 eeb72ac2 eeb70bc3 ed8d0a00  .*...*..........
    63. 06-06 15:46:28.839: E/CRASH(8490):     c745a3a4 e59d0000 eeb70bc2 ed8d0a00 e59d1000  ................
    64. 06-06 15:46:28.839: E/CRASH(8490):     c745a3b4 eb00001f ee030a10 eeb73ac3 ed9b2b16  .........:...+..
    65. 06-06 15:46:28.839: E/CRASH(8490): code around lr:
    66. 06-06 15:46:28.839: E/CRASH(8490):     d0ca18e8 00000000 00000000 00000000 00000000  ................
    67. 06-06 15:46:28.839: E/CRASH(8490):     d0ca18f8 00000000 00000000 e70ff920 00000000  ........ .......
    68. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1908 e70fe6a8 f1463e20 00000000 00000000  .... >F.........
    69. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1918 00000000 00000000 00000000 00000000  ................
    70. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1928 00000000 cf781994 00000000 00000000  ......x.........
    71. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1938 00000000 00000000 00000000 00000000  ................
    72. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1948 00000000 00000000 00000000 00000000  ................
    73. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1958 00000000 00000000 00000000 00000000  ................
    74. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1968 00000000 00000000 00000000 00000000  ................
    75. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1978 00000000 00000000 00000000 00000000  ................
    76. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1988 00000000 00000000 00000000 00000000  ................
    77. 06-06 15:46:28.839: E/CRASH(8490):     d0ca1998 00000000 00000000 00000000 00000000  ................
    78. 06-06 15:46:28.839: E/CRASH(8490):     d0ca19a8 00000000 00000000 00000000 00000000  ................
    79. 06-06 15:46:28.839: E/CRASH(8490):     d0ca19b8 00000000 00000000 00000000 00000000  ................
    80. 06-06 15:46:28.839: E/CRASH(8490):     d0ca19c8 00000000 00000000 00000000 00000000  ................
    81. 06-06 15:46:28.840: E/CRASH(8490):     d0ca19d8 00000000 00000000 00000000 00000000  ................
    82. 06-06 15:46:28.840: E/AndroidRuntime(8490): FATAL EXCEPTION: UnityMain
    83. 06-06 15:46:28.840: E/AndroidRuntime(8490): Process: com.****, PID: 8490
    84. 06-06 15:46:28.840: E/AndroidRuntime(8490): java.lang.Error: FATAL EXCEPTION [UnityMain]
    85. 06-06 15:46:28.840: E/AndroidRuntime(8490): Unity version     : 2017.3.1p1
    86. 06-06 15:46:28.840: E/AndroidRuntime(8490): Device model      : samsung SM-G950U
    87. 06-06 15:46:28.840: E/AndroidRuntime(8490): Device fingerprint: samsung/dreamqltesq/dreamqltesq:7.0/NRD90M/G950USQU1AQK3:user/release-keys
    88. 06-06 15:46:28.840: E/AndroidRuntime(8490): Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
    89.  
     
  39. poshaughnessey

    poshaughnessey

    Joined:
    Jul 12, 2012
    Posts:
    45
    Okay - it appears that the issue was that Advanced Input Field is accessing the camera, but we don't have any cameras in our scene - it is a Screenspace Canvas only. However, the code that access the camera, doesn't even make use of the value that is calculated in this code:

    Code (CSharp):
    1.         public static int DetermineThumbSize(Camera camera)
    2.         {
    3.             float physicalScreenSize = DeterminePhysicalScreenSize();
    4.             if(physicalScreenSize <= 0)
    5.             {
    6.                 return -1;
    7.             }
    8.             else
    9.             {
    10.                 float aspectRatio = (float)Screen.width / (float)Screen.height;
    11.                 float worldHeight = camera.orthographicSize * 2;
    12.  
    13.                 float normalizedThumbSize = (PHYSICAL_THUMB_SIZE / physicalScreenSize);
    14.                 float pixelScreenSize = Mathf.Sqrt(Mathf.Pow(Screen.width, 2) + Mathf.Pow(Screen.height, 2));
    15.                 float pixels = (pixelScreenSize * normalizedThumbSize) / 2f;
    16.  
    17.                 return Mathf.RoundToInt(pixels);
    18.             }
    19.         }
    The aspectRatio and worldHeight are calculated, but not used. Commenting out the worldHeight calculation fixes the crash.
     
  40. Arlocke

    Arlocke

    Joined:
    Dec 29, 2012
    Posts:
    2
    Hi @jpienbro ,

    We have a problem with AdvancedInputField in our project. There is a bug with keyboard undocking on iPad not working correctly.

    Using: Unity 2017.4.2f2 and AdvancedInputField 1.5.5

    To reproduce:
    1. Launch your built Unity app on iPad (at least iOS 5.0+)
    2. Tap an AdvancedInputField UI element
    3. Press and hold the keyboard button on the onscreen iOS keypad (bottom-right) and select undock from the menu.
    4. Tap outside the on-screen keyboard to hide the keyboard.
    5. Tap on another AdvancedInputField element.

    The keyboard will not reappear on any UI element and the app will require rebooting in order to be able to interact with the UI.
     
  41. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thank you for reporting that these 2 code lines weren't doing anything.
     
  42. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Another user already reported this issue, but I haven't had time yet to look into it. Will look into this issue this weekend.
     
  43. skasteve

    skasteve

    Joined:
    May 12, 2015
    Posts:
    1
    Hello, I recently purchased your plugin to evaluate integrating into an app my company is working on. The plugin looks like it meets all of our needs and looks like we can easily get it working with Text Mesh Pro text labels as well as customize the toolbar graphics, etc. One concern my company had was that there is no source for the NativeKeyboard libraries, so if we need to address any bug fixes on our own in that code, we wouldn't be able to. Is it possible to request access to that?
     
  44. poshaughnessey

    poshaughnessey

    Joined:
    Jul 12, 2012
    Posts:
    45
    One issue we are seeing with the plug-in is that it is possible to get into a state where multiple fields have their selection handles showing. It is a fairly rare event, since in order to do so, you have to touch the screen with two fingers, but some users have been able to get this to happen inadvertently when there is a stray touch. This happens on both iOS and Android.
     
  45. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    @jpienbro could you update the current feature set of Advanced Input Field? I'm considering buying it, but on the Asset Store page the last comment from a user about missing TextMesh Pro support is a month old and unanswered. The feature list does not list TextMesh Pro, but here it sounds as if only emojis were missing. I did not want to read through the whole forum post, so could you update the feature list on the asset, please?
     
  46. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    If you ever need the source code for the native bindings send me a PM. I can provide you the latest stable version (used in latest release).
     
  47. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thanks for the report. I've added it to the bug tracker
     
  48. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    TextMeshPro isn't officially supported yet. It's currently still in development phase. Haven't had much time available lately for the development of this plugin.
     
  49. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    Sounds like it's on the roadmap though, awesome :)
    Do you mind spoiling when you'll be tackling it? Now since Unity included it officially, this nice add-on would greatly help.
     
  50. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Probably somewhere next month.
    I was actually waiting for a fix for a bug in TextMeshPro related to incorrect character indexes when using emojis, but the developer of TextMeshPro is probably busy too.
    But if that fix takes too long, I'll focus on implementing support for normal TextMeshPro text rendering only and maybe tag emoji support as experimental (currently have a semi-working workaround to fix that character index bug).