Search Unity

Advanced Input Field

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

  1. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    You can't always replace the NativeKeyboard.aar from a newer version and use it with an older version of the plugin. Method signatures might be changed between releases. (Which seems to be the error reported in your the log)
     
  2. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Did you also add "ADVANCEDINPUTFIELD_TEXTMESHPRO" to Scripting Define symbols in Player Settings?
     
  3. cmbellman

    cmbellman

    Joined:
    Sep 19, 2013
    Posts:
    20
    I have plugin version 1.6.1, but since I ran into the "keyboard shows once, then never again" problem described earlier, I tried taking the AAR you provided as a solution in your post from May and replaced the one from the newest plugin. But that apparently didn't fix the problem, maybe same symptom as you describe but the plugin version is new and the aar is old... Anyway, is there a fix for the keyboard not showing in fullscreen = false apps on android (Huawei P20 pro, android 8.1)?
     
  4. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    Yes I did. Turns out this is some sort of a Unity bug. Scripts are showing as if there was a compiler error even though the console is showing none. reimporting all after setting up the project like this solves it. But I have not investigated what the cause is. If Unity on its own has this problem or if it starts appearing when using AIF too...
     
  5. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    I reimported all and it works!! Thank you very much.
     
  6. Micito

    Micito

    Joined:
    Dec 5, 2014
    Posts:
    16
    Hello everyone,

    Today we bought Advanced Input Field asset from the unity asset store, but we have some troubles implementing it in our project.

    We are using Unity 2017.4.3 and TextMeshPro. And when we try to create Advanced Input Field, an input field is created and it's missing TMP components for following GameObjects

    AdvancedInputFieldIssue.png

    Is it because we are using TextMeshPro asset from Asset Store, instead of one from unity package manager? What can we do to fix this?

    BTW AdvancedInputField with unity text is working correctly.
     
  7. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Yes, you should use the TextMeshPro version from the Package Manager.
    You also need to add "ADVANCEDINPUTFIELD_TEXTMESHPRO" to Scripting Define symbols in Player Settings. This enables the TextMeshPro binding of the plugin.
     
  8. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I tried one of the sample scenes on my Huawei Nexus P6 (which should be similar), put "Screen.fullscreen = false" in OnEnable and tested selecting/deselecting multiple inputfields and it reappears each time.
    Maybe something else is going wrong in your build.
    Could you check if it prints any error in the Android log?
     
  9. Micito

    Micito

    Joined:
    Dec 5, 2014
    Posts:
    16
    Thank you for a quick response.

    We are currently unable to update to newer version of unity. Is there any other way we can use TMP from asset store?
     
  10. cmbellman

    cmbellman

    Joined:
    Sep 19, 2013
    Posts:
    20
    I don't see any errors in logcat that I connect with this issue. I can reproduce the error on an emulator phone, so you should be able to do that too (I guess that you use Android Studio). I used a "Nexus S API 27" emulator. If you go inte AVD manager and create a virtual device, then select the following: Nexus S -> Oreo (Api 27, x86), and then keep it on and build your unity project and use Scene "Form" as startup, and in the "FormView" script add "Screen.fullScreen = false" in Awake. I get keyboard showing once I touch a field, then touch outside to close keyboard. After that it does not show up again. The emulator phone I used has hardware navigation buttons.

    Maybe it's a Android 8.1 bug?

    Another thought: I'm using this plugin for showing android status bar - I don't know if that can affect anything? It is working fine in plugin version 1.4.3 though (that version is in the production version of the game)
    https://github.com/Over17/UnityShowAndroidStatusBar

    That plugin is created by Unity:
    https://forum.unity.com/threads/status-bar-always-hidden-on-android.362779/#post-2589552
     
    Last edited: Sep 6, 2018
  11. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    You might be able to modify the classes in the plugin that require the new TextMeshPro classes to use the old (non Package Manager) ones, but I honestly don't know much the API of TextMeshPro has changed between those 2 versions.
     
  12. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    That plugin might have some influence. The way I fixed it for the Nexus 6P before was to calculate the offset from the bottom of the screen caused by the navigation bar of that device on plugin initialization and use it to check if the keyboard was completely hidden. On devices without the onscreen navigation bar the Android OS would return 0 when keyboard was completely hidden. On devices with the onscreen navigation bar it would not return 0 and that offset value would be the lowest value.

    Could you maybe try to make a small repro project? Or check with and without that StatusBar plugin?
     
  13. neomarian

    neomarian

    Joined:
    May 11, 2012
    Posts:
    43
    Hi,

    There is an issue with ActionBar when you create new inputs in runtime.
    To reproduce the issue create one input in runtime, edit that input (select and type some text) then deselect the input, create new input (without destroying the last one) and try to edit the new input created.
    I got this in ios.
    I fixed this on my project but you should update your plugin.
     
  14. neomarian

    neomarian

    Joined:
    May 11, 2012
    Posts:
    43
    My fix was to add these 2 lines in MobileTextInputHandler.cs, on line 76
    Code (CSharp):
    1. if (mobileTextNavigator != null && mobileTextNavigator.ActionBar == null)
    2.                 mobileTextNavigator.ActionBar = actionBar;
    so function InitActionBar looks like this now to me
    Code (CSharp):
    1. internal void InitActionBar(AdvancedInputField inputField, TextRenderer textRenderer)
    2.         {
    3.             actionBar = inputField.transform.root.GetComponentInChildren<ActionBar>(true);
    4.             if(actionBar == null)
    5.             {
    6.                 actionBar = GameObject.Instantiate(Settings.MobileActionBarPrefab);
    7.             }
    8.            
    9.             if (mobileTextNavigator != null && mobileTextNavigator.ActionBar == null)
    10.                 mobileTextNavigator.ActionBar = actionBar;
    11.  
    12.             actionBar.transform.SetParent(textRenderer.transform);
    13.             actionBar.transform.localScale = Vector3.one;
    14.             actionBar.transform.localPosition = Vector3.zero;
    15.  
    16.             actionBar.Initialize(inputField, this);
    17.         }
     
  15. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thanks for the report and the fix
     
  16. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Found the source of the issue. Margins weren't take into account properly in the calculation. The default margins for the text area is 12 for each side, so 24 vertical.

    To fix change the "UpdateSize" method in AdvancedInputField.cs:
    Code (CSharp):
    1. internal void UpdateSize(TextRenderer textRenderer)
    2. {
    3.     Vector2 size = Size;
    4.     Vector2 preferredSize = textRenderer.PreferredSize;
    5.     TextContentTransform.sizeDelta = preferredSize;
    6.  
    7.     if(mode != InputFieldMode.SCROLL_TEXT)
    8.     {
    9.       switch(mode)
    10.       {
    11.          case InputFieldMode.HORIZONTAL_RESIZE_FIT_TEXT:
    12.             float marginX = (RectTransform.rect.width - TextAreaTransform.rect.width);
    13.             size.x = Mathf.Max(preferredSize.x, ResizeMinWidth - marginX);
    14.             size.x += marginX;
    15.             Size = size;
    16.             break;
    17.          case InputFieldMode.VERTICAL_RESIZE_FIT_TEXT:
    18.             float marginY = (RectTransform.rect.height - TextAreaTransform.rect.height);
    19.             size.y = Mathf.Max(preferredSize.y, ResizeMinHeight - marginY);
    20.             size.y += marginY;
    21.             Size = size;
    22.             break;
    23.       }
    24.    }
    25. }
     
  17. Sam_Thomas

    Sam_Thomas

    Joined:
    Sep 13, 2017
    Posts:
    2
    Hi there,
    I'm currently trying to implement this package and have run into an error with the Action Bars
    I have two canvases both using the advanced input field, let's call them Canvas A and Canvas B.
    Canvas A exists over Canvas B in the hierarchy and the ActionBars appear on the input fields on Canvas A but not on Canvas B, even if the Canvas component is turned off on Canvas A. If I switch the two Canvases around in the hierarchy, the ActionBars now appear on Canvas B but not on Canvas A. Both Canvases exist on the same layer, and messing around with the Order in Layer and Plane Distance doesn't seem to affect anything.
    Has anybody encountered this before/ have a fix for this?
     
  18. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    The ActionBar is normally shared between InputFields, so I think the problem is that when initializing it's parent will be set to the first Canvas once, but never switching to the other Canvas.
    You could try modifying the method SyncTransform in CanvasFrontRenderer.cs to this:
    Code (CSharp):
    1. internal void SyncTransform(RectTransform actionBarRectTransform)
    2. {
    3.    Initialize();
    4.  
    5.    Vector3[] corners = new Vector3[4]; //BottomLeft, TopLeft, TopRight, BottomRight
    6.    actionBarRectTransform.GetWorldCorners(corners);
    7.  
    8.    RectTransform canvasRectTransform = canvas.GetComponent<RectTransform>();
    9.    for(int i = 0; i < 4; i++)
    10.    {
    11.       corners[i] = canvasRectTransform.InverseTransformPoint(corners[i]);
    12.    }
    13.  
    14.    Vector2 size = corners[2] - corners[0];
    15.    Vector2 center = Vector3.Lerp(corners[0], corners[2], 0.5f);
    16.  
    17.    rectTransform.anchoredPosition = center;
    18.    rectTransform.sizeDelta = size;
    19.    rectTransform.SetAsLastSibling();
    20. }
    Basically calling Initialize() each time it updates it's transform, so it gets reparented to current Canvas.
     
  19. ToomToomToom

    ToomToomToom

    Joined:
    Jul 8, 2017
    Posts:
    6
    Hi,
    I've just bought Advanced Input Field asset.
    Issue is:
    Forms sample scene works good on android if in the new Project. In my current project (with a lot of standard Unity Input Fields) the same sample scene (Forms) it doesn't work on android - text isn't shown in input field box.
    On android is only warning message: "Couldn't filter ''. It's not a valid decimal string or decimal string is too big".

    Could you guess what could be a reason? Does this asset needs some specific settings or sth?
    Thanks in advance for help.
     
    Last edited: Sep 11, 2018
  20. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Are you perhaps using other (Android) plugins in your project that might conflict with it?
    That warning in the log is normal for that scene, it's because the text is empty in that inputfield on boot, so the linked PostProcessingFilter will not work.
    You could also try to modify the font size (make it a bit smaller) on the Text components on the InputFields, but normally the sample scenes should work as.
     
    Last edited: Sep 11, 2018
  21. Sam_Thomas

    Sam_Thomas

    Joined:
    Sep 13, 2017
    Posts:
    2
    Hi,
    Thanks for the reply. I tried implementing your fix, but it hasn’t made a difference unfortunately – same behaviour.
    In my scene I have 4 canvases that need the Advanced Input Field functionality - Canvas A,B,C,D.
    Canvas A and B are under Group1, Canvas C and D are under Group2.
    Canvas A is lower in hierarchy then B, and similarly, C is lower than D. Both B and D are working, both A and C are not. If I swap A with B and C with D, A and C will work. (lower means that it’s visibly higher in the hierarchy window – “closer” to the camera)
    Correct me if I’m wrong but to me it seems that you mean there’s only one ActionBar in the scene and it should be reparented to the Canvas it’s currently being used on. If this is the case, I don’t understand how my Canvases are behaving like this – surely only one of them should work?
    Would it be possible to maybe add an ActionBar to every canvas that needs to use it? Is there anything else I could try?
     

    Attached Files:

  22. Arup-Kumar-Sen

    Arup-Kumar-Sen

    Joined:
    Sep 30, 2014
    Posts:
    3
    Hi
    I am changing orientation runtime from portrait to landscape. In portrait mode, keyboard is coming but in landscape mode keyboard not coming. I think I have to change the keyboard orientation, but I done know how to change, please help me.
     
  23. Arup-Kumar-Sen

    Arup-Kumar-Sen

    Joined:
    Sep 30, 2014
    Posts:
    3
    I have found the problem, it is not working in Jionee Phone, In Motorola it is working
     
  24. MohHeader

    MohHeader

    Joined:
    Aug 12, 2015
    Posts:
    41
    Hi :)

    Thanks for the plugin,,,
    I found a bug, selection(caret) position is different than click position.
    ( I have some problems in making selection work on iOS, so all my testing is on Editor so far )

    to reproduce :
    Create new ( Create InputField with Unity Text )
    Adjust Line type to single line
    adjust all the three text components to ( middle alignment )
    Play

    now when you select the text, it will select with right offset.

    The point is, I want the text to be in the middle of background,
    as a workaround, I will just Align the text to left OR use Multi Line Submit ( but still need to test the sequences )
    But hope this to be fixed.

    Thanks :)


    ------ Edit
    I did some debug, & think that it is related to how ( Content Width ) is calculated.
    when it is Single Line, the content width is much bigger than it should be ,,,

    So I am thinking either we fix the width, or we just subtract the extra width when calculating caret position
     
    Last edited: Sep 14, 2018
  25. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    Hello, I'm using your plugin with Unity 5.6 (stand alone) and I noticed that the caret movement does not work as it should. While holding ctrl+arrow it doesn't jump to beginning/end of words (even though your code suggests it should). While holding ctrl+shift+arrow it does jump correctly, but it doesn't select, as is common. Is this by design? Can you reproduce it?
     
  26. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    When pressing tab, the focus goes to the next AdvancedInputField. This is handy - but how would I go about selecting a "Selectable" next, e.g. a button or similar? It would be handy if shift-tab could move to the previous field, like in other applications. But most importantly, I can't get Unity's way of navigating across selectables to work. It's as if the AdvancedInputField isn't a selectable.

    Unity Input Fields have a colored border that highlights when selected. How can I reproduce this with your plugin?

    I don't want to complain, this is a great plugin and it's probably going to save my ass - but right now I'm having a hard time reconstructing some of the behavior that I already had working with Unity's Input Fields. Help...
     
  27. draganjovic5mict

    draganjovic5mict

    Joined:
    Jul 27, 2018
    Posts:
    1
    Hello,

    I took your asset to testing to see if I could use it my app. First thing I did is created new project just for testing purposes, I followed steps from ReadMe document. I am trying to create an UWP build with testing scene (LiveProcessing to be precise). When trying to build I got problem "The type or namespace name 'NativeUWP' could not be found". I did not make any changes on the scene or in code. My version of unity is 2018.2.7f1. What should I do to fix this problem?
     
  28. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    Did you consider this line in the docs:
     
  29. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    @jpienbro for some reason, when I add a new AdvancedInputField from to menu, it's height is twice as high (640 * 160) and wider than it's child content, at which point formatting does not happen properly anymore. I added it in the Modes.unity scene. I can of course resize everything to my liking, but I'd like this to be instantiated already properly setup

    Formatting issue.PNG
     
  30. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    @jpienbro another one. I wanted to avoid spaces. So I hooked into OnValueChanged, altered the text in case of a space appearing and reassigned it to the AdvancedInputField Text property. Next thing I type in throws an error, because the carret position is used for text insertion, but is not updated to the new text length (TextManipulator.cs 177)
    Am I doing something wrong here?
     
    Last edited: Sep 14, 2018
  31. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I had hoped that quick fix would work, but it looks like I need to more put more time into reproducing it then ;). Do all Canvases use the render mode "Screen space - Camera" or do some of them use a different one?
     
  32. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Does that Jionee Phone maybe have onscreen navigation buttons at the bottom of the screen and that Motorola phone not?
     
  33. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I'll look into your bugs. It's true that it might act differently than other selectable classes, because I needed to work around some of Selectable default "unwanted" behaviour, such as selecting on press instead of on release which is really annoying in a ScrollRect on mobile.
    I'll add them to my TODO list.
     
  34. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Thanks for the bug report.
    I've added it my TODO list (Trello board: https://trello.com/b/0qda8XOp/advanced-input-field)
     
  35. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Are you testing this on Mobile perhaps? I've fixed an issue with manual Text changes not being send properly to the mobile binding in the development version (fix will be in next release).

    On the long term: I also added a feature implementation to my TODO list that should make blocking certain characters more easily, basically a customizable CharacterValidation type that can block characters on the native side before being send to the Unity side.
     
  36. erik_gg

    erik_gg

    Joined:
    Jul 18, 2017
    Posts:
    2
    Hi,
    it was my colleague working on this last week, he's on holiday so I took over :).

    Yes, all the canvases are "Screen space - camera".
     
  37. samojovic

    samojovic

    Joined:
    Oct 19, 2017
    Posts:
    1
    Hello hexagonius,
    Yes, it is XAML build.
     
  38. Micito

    Micito

    Joined:
    Dec 5, 2014
    Posts:
    16
    Hi @jpienbro,

    We managed to update to new version of unity and try the asset there. But it's not working in UWP, so we created a new empty project and installed the plugin there. And that is not working as well.

    We tried it with XAML, with IL2CPP scripting backend.

    So the input field is visible, but you cannot type anything with the keyboard. You can select it, but for some reason you cannot type. We also tried it with OnScreen Keyboard and that is not working either. We're guessing the issue is with UWP native keyboard dll.

    Any idea on how to resolve the matter?

    EDIT: After making Debug build we got these errors, maybe they help
    Screenshot_2.png
     
    Last edited: Sep 18, 2018
  39. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Hello @jpienbro ,
    i was thinking about buying this asset for a long time, because i need much better behaviour on mobile phones, that unity standard asset (UI.Text) offers. I finally have bought it today.

    I have used the modified UI.Text asset, that i derived from and i added a few new properties/events to adjust it to my application use cases. My plan was to derive from AIF similarly to keep the "status quo" in the code, so i do not need to rethink everything from the scratch. Base derived class of the input field looks like that

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using System;
    4. using UnityEngine.EventSystems;
    5.  
    6. /// <summary>
    7. /// IHighligtable => Change font style
    8. /// IActivatable => Activate/Deactivate input field, set interactivity
    9. /// </summary>
    10. public abstract class ValidatedInputField : InputField, IHighlightable, IActivatable {
    11.  
    12.     private bool m_Highlighted = false;
    13.     public bool Highlighted
    14.     {
    15.         get
    16.         {
    17.             return this.m_Highlighted;
    18.         }
    19.  
    20.         set
    21.         {
    22.             if (this.m_Highlighted != value)
    23.             {
    24.                 // there is a difference
    25.                 FontStyle newFontStyle = value ? FontStyle.Bold : FontStyle.Normal;
    26.  
    27.                 // Process highlighting of text
    28.                 this.textComponent.fontStyle = newFontStyle;
    29.  
    30.                 this.m_Highlighted = value;
    31.             }
    32.         }
    33.     }
    34.  
    35.     private bool m_Activated;
    36.     public bool Activated
    37.     {
    38.         get { return this.m_Activated; }
    39.         set
    40.         {
    41.             this.m_Activated = value;
    42.             // When activated, than set interactible and ActivateInputField, otherwise Deactivate and set !interactable
    43.             if (this.m_Activated)
    44.             {
    45.                 interactable = true;
    46.                 ActivateInputField();
    47.             }
    48.             else
    49.             {
    50.                 DeactivateInputField();
    51.                 interactable = false;
    52.             }
    53.         }
    54.     }
    55.  
    56.     public event Action Change;
    57.        
    58.     private bool m_IsTextValid;
    59.     /// <summary>
    60.     /// Indication, whether text is valid
    61.     /// </summary>
    62.     public bool IsTextValid
    63.     {
    64.         get
    65.         {
    66.             return this.m_IsTextValid;
    67.         }
    68.  
    69.         set
    70.         {
    71.             this.m_IsTextValid = value;
    72.             // Text color based on validation
    73.             this.textComponent.color =
    74.                 this.m_IsTextValid ? this.m_ValidatedOkColor : m_ValidatedErrorColor;
    75.  
    76.             PropagateChange();
    77.         }
    78.  
    79.     }
    80.     void PropagateChange() {
    81.         var handler = this.Change;
    82.         if (handler != null)
    83.         {
    84.             handler();
    85.         }
    86.     }
    87.  
    88.     /// <summary>
    89.     /// Text of the input box
    90.     /// </summary>
    91.     public new string text {
    92.         get
    93.         {
    94.             return base.text;
    95.         }
    96.         set
    97.         {
    98.             base.text = value;
    99.             // Adds a validation of the text
    100.             ValidateText(value);
    101.         }
    102.     }
    103.     public new bool interactable
    104.     {
    105.         get { return base.interactable; }
    106.         set
    107.         {
    108.             base.interactable = value;
    109.             placeholder.color = value ? pHolderInterColor : pHolderColor;
    110.         }
    111.     }
    112.     private Color m_ValidatedOkColor;
    113.     private static Color m_ValidatedErrorColor = Color.red;
    114.     private Color pHolderColor;
    115.     private Color pHolderInterColor;
    116.  
    117.     // Use this for initialization
    118.     protected override void Start () {
    119.         base.Start();
    120.  
    121.         this.pHolderColor = this.placeholder.color;
    122.         this.pHolderInterColor = new Color(pHolderColor.r, pHolderColor.g, pHolderColor.b, 0.5f);
    123.         this.m_ValidatedOkColor = this.textComponent.color;
    124.         this.onValueChanged.AddListener(OnChangeHandler);
    125.         this.onEndEdit.AddListener (EndEditHandler);
    126.         // Initialization
    127.         this.caretWidth = 3;
    128.         // Character for password have UTF code 9679 (●)
    129.         this.asteriskChar = char.ConvertFromUtf32 (9679)[0];
    130.     }
    131.  
    132.     /// <summary>
    133.     /// Function, that is used for text validation
    134.     /// </summary>
    135.     /// <param name="textToValidate"></param>
    136.     /// <returns></returns>
    137.     protected abstract bool ValidateText(string textToValidate);
    138.  
    139.     protected virtual void EndEditHandler(string s) { }
    140.  
    141.     private void OnChangeHandler(string newText)
    142.     {
    143.         // Just validate the text. Text have been already set
    144.         this.IsTextValid = ValidateText(newText);
    145.     }
    146. }
    147.  
    I have multiple class derived from ValidatedInputField, that implements validation alone.

    Now, i am little bit depressed, because i would like to adjust it to be usable in the AIF component, but it is not so straightforward like i thought so. I would like to achieve all this behaviour
    1. I need to have only one AIF active and interactable in the scene. I would like to indicate activated one by setting font style to BOLD.
    2. I need to validate the content of the AIF everytime, the content is changed. I would like to indicate, whether the content is valid or not by changing texts color
    3. I need to do the validation every time, even when the content is changed by code outside

    as for validations, i have multiple ones
    1. text length validation - text has at least length of X
    2. password strength validation
    3. password confirm validation - text is same as other text in the AIF
    4. mail validation
    5. phone number validation
     
  40. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    There is a potential bug in textNavigator file

    internal virtual void UpdateCaret(TextRenderer textRenderer)
    {
    bool fixEmptyCaret = false;
    if(textRenderer.CharacterCount == 0 || Text.Length == 0) //Workaround to make sure the text generator will give a correct position for the first character
    {
    fixEmptyCaret = true;
    textRenderer.UpdateImmediately(" ");
    }


    When Text is null, than i get NullPointerException there. It could be null theoretically (when you set it to null by code)
     
  41. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    60
    Any idea when this will appear in the asset store? This is an issue in our app and I'm hoping the update will solve it. I've been trying every possible way to create a simple 2-digit state validator with blocking of nonvalid input (compared against a list of valid 2-digit states). Whether I use Live Processing or a simple check in OnValuechanged it causes errors with the caret position. If I alter the length of the value of field.Text I get argument out of range errors and/or odd behavior in the input. I thought I solved it by moving validation to Update() but that only fixed it in the editor. Once it's published to iOS it doesn't work. As soon as the validation attempts to block an invalid letter by setting field.Text to a new string value with shorter length the input stops working. Do you think the update will fix it?
     
  42. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    Hey, I'm on AIP 1.6.1 and this problem already appears in the editor.
     
  43. hexagonius

    hexagonius

    Joined:
    Mar 26, 2013
    Posts:
    98
    And how would you go about using the ContentSizeFitter on the TMP AIP? It seems that the nesting and the several components are not handling this properly.
     
  44. erik_gg

    erik_gg

    Joined:
    Jul 18, 2017
    Posts:
    2
    Hi @jpienbro,

    Did you have a chance too look into our problem with the ActionBars?

    Thanks :)
     
  45. Arup-Kumar-Sen

    Arup-Kumar-Sen

    Joined:
    Sep 30, 2014
    Posts:
    3
    But How I solve that issues in jionee phone, please reply me, it is very urgent & I stuck on this long time.
     
  46. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I could reproduce this in the newer Unity versions (for some reason the main UWP Window is always null). In earlier versions of Unity this wasn't an issue, I though it was related to IL2Cpp being forced by Unity now (as .net backend is deprecated for UWP), but on the (now deprecated) .net backend also has the same issue.
    Don't have a workaround/fix for now and would require some more time (especially since UWP development with the IL2Cpp is super slow now, hope Unity improves this).
     
  47. marcz88

    marcz88

    Joined:
    Mar 12, 2017
    Posts:
    41
    Hello, I have a few customers with LG g7 reporting that the keyboards appears once, twice, sometimes three times, but eventually the keyboard stops appearing when tapping inside fields. I've sent one particular customer I know the very latest sample code to see if the latest code fixes the problem. Unfortunately it doesn't. To get the keyboard to appear, they have to kill the app, restart it and use that app until the keyboard stops appearing. At that point they are stuck again and have to restart the app.

    Has anyone else reported this issue? Pretty nasty.

    I have a screen cap of the software info page for the phone, if that helps.

    upload_2018-9-24_18-6-17.png
     
    Last edited: Sep 25, 2018
  48. cmbellman

    cmbellman

    Joined:
    Sep 19, 2013
    Posts:
    20
    Sorry for late reply, I currently have a long backlog :)
    Anyways, I have reverted to the 1.4.3 version of the plugin, for now. It may be the "show status bar" plugin that's playing bad with your plugin, but I don't know that for sure. When I get some more time I will do some more testing. I think that many people using a plugin like yours will want to show the status bar as well, since a text-input-intensive app most likely will behave more like an app than a traditional game.

    Also we have been having a lot of problems with the plugin reporting wrong height for ios keyboards on different devices, and also may be reporting correct for zoomed display mode and not for non zoomed, or vice versa. So on some devices we need to do a manual adjustment of the height we get reported from the plugin becase the keyboard is covering the input field. Just a heads up. :)
     
  49. Roywise

    Roywise

    Joined:
    Jun 1, 2017
    Posts:
    68
    @jpienbro I've sent you a direct message. Could you check it out when you have the time? Thanks in advance.
     
  50. marcz88

    marcz88

    Joined:
    Mar 12, 2017
    Posts:
    41
    Anyone?

    This is a serious problem affecting a number of customers who have LG G7 phones. The latest sample app reproduces the problem. The virtual keyboard just stops popping up.

    Is LG G7 supported by Advanced Input?