Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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
    All the rendering (except the keyboard) is done in Unity. Internally the plugin does use a native inputfield to process the keyboard events.
    If you have an Android device, you could try to install the apk file for the "Chat" sample scene (link is in the first post of this thread) to see if this is the behaviour you want.
    By default the keyboard gets hidden when you tap on another UI element, but the plugin provides a way to block this (Unity UI EventSystem) behaviour using the .ShouldBlockDeselect property. When set to true this basically reselects the inputfield and keeps the keyboard active (stays onscreen) whenever another UI element gets tapped/selected.
     
  2. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    Thanks for the reply.
    I've tested the chat demo. Is there a way to copy and paste from native stuff to the input field?
     
    Last edited: Jun 11, 2020
  3. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    Is it possible to have all the keyboard features from this great plugin on a regular InputField, or some simplified UI object that behaves more as the current Unity InputField? I mean, single line, no scrolls, and no content area.

    If not, is it possible to de-activate the content area resizing? Texts areas within the Content object, are calculated at runtime reducing the area that the user needs to touch in order to activate the keyboard. This is not a desirable behavior in a single line input field.

    Thank you
    Andres
     
  4. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Yes, the plugin provides an option to show an ActionBar to copy to and paste from the native clipboard.
    See the username input field in the Form sample scene as an example.
     
    martingonzalezetermax likes this.
  5. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Not sure if I understand correctly, but by default the whole inputfield area can be used to select the input field (even if the actual text is smaller).
    Maybe you deactivated/removed the Background child gameobject of the AdvancedInputField. Then it will only select on the visible text. If this is the case, maybe you could just make the background transparent.
     
  6. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    Thank you jpienbro

    It was my fault, I deselected the Raycast Target in the background object. Now it works fine.

    Another feature from the regular InputField is the different color transitions for the different states of the field. Is there a simple way to implement this?

    Andres
     
  7. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    How does the licence works? It's says that is one per seat but, what if i buy it to use it in a team?
     
  8. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I've modified the Editor script of AdvancedInputField to expose the Transition properties of the Selectable base class.
    Seems to work when running a quick test with color & sprite transition in the Editor.
     

    Attached Files:

    Last edited: Jun 15, 2020
  9. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I'm not really sure how the licensing works since last AssetStore change. but I know most scripting categories in the AssetStore automatically have that license. I originally intended that a single license of this plugin could be used by an individual hobbyist, an organization unit or a team. So it's fine by me to use the same license in a team, but I'm confused about the AssetStore licensing too.
     
    martingonzalezetermax likes this.
  10. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    Thank you jpienbro

    I have an advanced input field with the Dollar post processing filter. There is an initialization routine that sets this field to an empty value. And it is running both commands:

    advInputField.Text = "";
    advInputField.SetText("", true);

    However, the actual value on the Processed text object is not changed, and the field appears as it did not change.

    It seems that the problem is in the DollarAmountFilter script, because the same problem happens live. When you delete a value from a the field while editing it live. If you touch outside, the field renders the previous value.

    Andres
     
    Last edited: Jun 16, 2020
  11. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I could reproduce and fix both issues:
    Change SetText in AdvancedInputField.cs to this:
    Code (CSharp):
    1. public void SetText(string text, bool invokeTextChangeEvent = false)
    2.         {
    3.             if(text == null) { text = string.Empty; }
    4.  
    5.             if(this.text != text)
    6.             {
    7.                 this.text = text;
    8.  
    9.                 if(!RichTextEditing)
    10.                 {
    11.                     TextRenderer.Text = text;
    12.                     UpdateActiveTextRenderer();
    13.                 }
    14.  
    15.                 lastTextEditFrame.text = text;
    16.  
    17.                 if(invokeTextChangeEvent && onValueChanged != null)
    18.                 {
    19.                     GetActiveBehaviour().StartCoroutine(DelayedValueChanged());
    20.                 }
    21.  
    22.                 if(!initialized)
    23.                 {
    24.                     return;
    25.                 }
    26.                 textNavigator.RefreshRenderedText();
    27. #if(UNITY_IOS || UNITY_ANDROID || UNITY_WSA)
    28. #if UNITY_EDITOR
    29.                 if(Selected && Settings.SimulateMobileBehaviourInEditor)
    30.                 {
    31.                     ((MobileTextManipulator)textManipulator).UpdateNativeText(text);
    32.                 }
    33. #else
    34.                 if(Selected && !ShouldUseHardwareKeyboard())
    35.                 {
    36.                     ((MobileTextManipulator)textManipulator).UpdateNativeText(text);
    37.                 }
    38. #endif
    39. #endif
    40.                 if(LiveProcessing)
    41.                 {
    42.                     string processedText = liveProcessingFilter.ProcessText(text, textNavigator.CaretPosition);
    43.                     if(processedText != null)
    44.                     {
    45.                         ProcessedText = processedText;
    46.  
    47.                         if(Selected)
    48.                         {
    49.                             int caretPosition = textNavigator.CaretPosition;
    50.                             int processedCaretPosition = liveProcessingFilter.DetermineProcessedCaret(text, caretPosition, processedText);
    51.                             textNavigator.ProcessedCaretPosition = processedCaretPosition;
    52.                         }
    53.                     }
    54.                 }
    55.                 else if(PostProcessing && !editMode)
    56.                 {
    57.                     textManipulator.EndEditMode(); //Execute post processing filter immediately
    58.                 }
    59.                 else
    60.                 {
    61.                     if(Selected)
    62.                     {
    63.                         if(textNavigator.CaretPosition > text.Length)
    64.                         {
    65.                             textNavigator.SetCaretPosition(text.Length, true);
    66.                         }
    67.                     }
    68.                 }
    69.             }
    70.         }
    Change EndEditMode() in TextManipulator.cs to this:
    Code (CSharp):
    1. internal void EndEditMode()
    2.         {
    3.             if(InputField.PostProcessingFilter != null)
    4.             {
    5.                 string processedText = null;
    6.                 if(string.IsNullOrEmpty(Text)) //Empty
    7.                 {
    8.                     InputField.ProcessedText = string.Empty;
    9.                 }
    10.                 else if(InputField.PostProcessingFilter.ProcessText(Text, out processedText)) //Try to process text
    11.                 {
    12.                     InputField.ProcessedText = processedText;
    13.                 }
    14.                 else //Couldn't be parsed, use original value
    15.                 {
    16.                     InputField.ProcessedText = Text;
    17.                 }
    18.             }
    19.         }
     
  12. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    Thank you again jpienbro

    It works fine now.
     
  13. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    @jpienbro
    I just start playing with the plugin and seems to work great. I have a question, in iOS the caret selection works perfectly but in Android (Samsung S6) when I try to use the caret selection automatically the caret go to the end of the line. Is there any fix or I'm using wrong?

    Edit:

    Found that if Multiline is selected there is a bug with the caret selection

    Edit 2:

    Seems that multiline only support line selection right instead of character selection?
     
    Last edited: Jun 17, 2020
  14. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    iOS & Android selection should work te same. They uses the same code. You might have the problem that your finger is slightly below the text line (out of bounds) and then it will select the last character as the selection end (as the input position is not within any visible character). To make it easier to see what you are selecting on mobile, you can enable the "SelectionCursors" (MobileOnly) property on an AdvancedInputField instance. Then it will show two handles to freely move the selection start and the selection end.
     
  15. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    Hi!
    I have this strange bug in the scroll. Is there any setting to fix it?
     

    Attached Files:

  16. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Hmm...looks like plugin thinks it needs to scroll back. I've tried to reproduce it with Chat sample scene (modified to use TEXT_SCROLL mode and line limit set to 0), but there it seems to scroll normally.
    Maybe you have some kind of offset on the Text, Processed, Placeholder child objects. They all need to be anchored to 0 for all sides. (If you need a smaller text area, you can better modify the anchor/margins on the TextArea child object).

    If this is not the case, could you send me a small repro project?
     
    martingonzalezetermax likes this.
  17. user_unity1

    user_unity1

    Joined:
    Dec 13, 2018
    Posts:
    3
    Hello! I have a problem with navigation bar. It appears in landscape mode (and it is not transparent). And it not disappears after keyboard hides.
    That problem can be reproduced in you chat app sample.
    Thanks!
     
  18. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    @jpienbro Is there a way to center the text? I've tried to center TextArea but if I resize that the mask will cut my text.
    If i center the text (both placeholder an text) but the scroll will do weird things.
     
  19. martingonzalezetermax

    martingonzalezetermax

    Joined:
    Dec 11, 2017
    Posts:
    24
    I add another thing that is happening to me.
    Sometimes when I stop Unity the plugin throws a null reference

    NullReferenceException: Object reference not set to an instance of an object
    AdvancedInputFieldPlugin.MobileTextNavigator.KeepActionBarWithinBounds () (at Assets/Package/AdvancedInputField/Scripts/InputField/MobileTextNavigator.cs:611)

    Camera camera = Canvas.worldCamera;
    here -> float orthographicHeight = camera.orthographicSize;

    Is the plugin listening an editor event?
     
  20. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I couldn't reproduce it on my test Android device with the chat sample scene. Normally the plugin should save navigation bar state before keyboard appears and restore that state when the keyboard disappears.
    Does it happen on multiple Android devices or only a specific one?
    Do you maybe have a custom AndroidManifest.xml or custom code in your project that specifies a specific navigation bar/fullscreen display mode?
     
  21. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I could reproduce the issue that scrolling will get weird when using center alignment for the text renderers, but haven't found a fix yet. I'll look into it more thoroughly this week.
     
    martingonzalezetermax likes this.
  22. user_unity1

    user_unity1

    Joined:
    Dec 13, 2018
    Posts:
    3
    Device is Xiaomi Redmi 6, Android 8.1.0.
    But that problem also actual for Samsung Galaxy A50 (10.0), Google Pixel 2 8.1, Huavei P20 8.1.
    App is "Sample: TMP_Chat".

    I recorded video https://photos.app.goo.gl/5ZuengRjdTqyFFiF7
     
  23. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I managed the get positioning/scroll calculation working when the alignment of the text renderers is not the default upper left text alignment. Tested it when using the same text alignment for all 3 of the text renderers (Text, Placeholder, Processed).
    Could you verify if this works in your project (when using center text alignment)?
    The patch package can be installed over version 1.9.7 of the plugin.
     

    Attached Files:

    martingonzalezetermax likes this.
  24. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I needed to test it on multiple Android devices to find one that had the behaviour you mentioned.
    I could fix it partly, the navigation bar gets hidden now in landscape mode too when the keyboard is gone. The navigation bar seems to be forced when the keyboard is active on those devices. I tried calling the navigation bar hide code each frame when the keyboard was visible, but it would not work until the keyboard was completely hidden. So when the keyboard is visible the navigation bar will also visible, but when the keyboard is gone it will now hide the navigation bar too.

    To fix that the navigation bar gets hidden in landscape mode when the keyboard is gone replace the NativeKeyboard.aar file in Assets/Plugins/Android with the one in attached zip file.
     

    Attached Files:

  25. user_unity1

    user_unity1

    Joined:
    Dec 13, 2018
    Posts:
    3
    Thank you for quick fix! It was very helpful!
    But there is another problem - the bar sometimes is not transparent and hides some ui interfaces.
     
    Last edited: Jul 14, 2020
  26. unity_6fK-bmGo_PukJg

    unity_6fK-bmGo_PukJg

    Joined:
    Feb 14, 2020
    Posts:
    6
    I still can't figure out why the keyboard doesn't appear when I tap on the field on Android. Yes, the simple scene works as expected. Yes, it probably caused by some plugins or settings. Can anybody give the cue what can conflict with the AIF?
    I tried to call NativeKeyboardManager.ShowKeyboard, TouchScreenKeyboard.Open and etc
    The AIF component is attached to a GameObject which is in a prefab and instantiates during the runtime
    Thanks in advance
     
  27. unity_6fK-bmGo_PukJg

    unity_6fK-bmGo_PukJg

    Joined:
    Feb 14, 2020
    Posts:
    6
    jpienbro, is that possible to subscribe to the received code? (OneTimeCode)
     
  28. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I noticed that it happens too sometimes, but don't know how to fix it. You could try different fullscreen mode settings for your app by calling native Java code from Unity. See: https://developer.android.com/training/system-ui/immersive
    But I've noticed that not all Android devices behave the same when setting these flags.
     
  29. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Not really, Android & iOS handle one time codes differently. iOS just modifies the inputfield text directly. So the easiest way would be to just use the OnValueChanged event and checking if more then 1 character has changed since last time OnValueChanged was called.

    For that plugin conflict you could check if there is some kind of error or warning printed in the log of your Android device. The only thing I can think of that could conflict with this plugin is another plugin that does something with native Android Views (and possibly preventing the native inputfield that this plugin uses internally from being focused).
     
    unity_6fK-bmGo_PukJg likes this.
  30. AnthonySharp

    AnthonySharp

    Joined:
    Apr 11, 2017
    Posts:
    88
    Hi :) I recently bought the plugin and it's going great so far. But there is one little issue that I've run into. I need both rich text and emoji input... but whenever I enable 'Rich Text Editing' in the editor, the emoji keyboard becomes disabled:

    no rich text.png

    Rich text editing off:

    rich text disabled.png

    Rich text editing on:

    rich text enabled.png

    I've looked at the following but none of them seem to change regardless of whether rich text is enabled or not (OurTextInputObject is an AdvancedInputField object):

    Code (CSharp):
    1. OurTextInputObject.KeyboardType
    2. OurTextInputObject.ContentType
    3. OurTextInputObject.ReturnKeyType
    4. OurTextInputObject.EmojisAllowed
    5. OurTextInputObject.InputType
    Emojis are enabled.

    The reason I need the emoji keyboard alongside rich text editing is because I am replacing the unicode string data with <sprite> tags via a script I have written to allow for full multi-byte emoji support. When I enable rich text, I can do that, but I can't type in emojis. When I disable rich text, I can type in emojis, but I can't insert <sprite> tags.

    Any thoughts? Thanks in advance.

    Edit: sorry those images are quite big!
     
  31. bryan_l1

    bryan_l1

    Joined:
    Apr 6, 2017
    Posts:
    12
    Hello,

    In an earlier post you mentioned that Asian IME's are not supported at the moment. But in the Sample: TMP_Chat demo I was able to type and send characters using the built in Japanese and Chinese keyboards on Android (text shows up as empty squares).

    With TextMeshPro supporting Asian language characters using the Dynamic SDF system (as described in this post), does that mean typing and submitting Asian language characters using the plugin will work if you use TextMeshPro?

    Thanks!
     
  32. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Hmm. That's a use case I haven't considered when implementing rich text support. Also, as mentioned in the ReadMe "At the moment only tag pairs are supported. This means that there needs to be a start and a corresponding end tag for each effect". So sprite inserts are not supported at the moment, since those are single tags.

    I will add support for single tags to my TODO list for now. Not sure when I will time to implement it. Probably will be released with version 2.0.0 of the plugin (for which I'm currently rewritting the core of the plugin). 1.9.* release cycle is currently only for fixes.
     
  33. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Well, it's not officially supported on all platforms. On Android & iOS it might just work as expected when using the default system keyboard for Asian languages since the OS interpretes the keys (internally the plugin uses a native inputfield when using Android or iOS). On Standalone I would need to use the Unity interpreter for asian keyboards, which doesn't seem to work properly currently and I don't have the knowledge to implement something like that myself (I don't have experience with Asian glyphs).
     
  34. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    250
    Hi, I have some questions before purchasing this asset.
    1. Does this asset fix the problem on Android where the native touch keyboard will make application lost focus?
    Currently, users have to tap outside of the touch keyboard to hide it first before being able to interact with in-game buttons
    2. I see your asset support TMP, does this also mean you support font fallback of TMP, right? (Just to be sure)
    3. Is there an emoji support? if not, can I use this input field with this https://forum.unity.com/threads/full-emoji-support-api-emoji-sequen.660310/page-2 > ?
     
  35. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    1. The plugin provides 2 ways to block keyboard hide when tapping on a button (basically counteracting the default Unity EventSystem behaviour). Add the button as a child object of the AdvancedInputField instance. Then it will reselect the "parent" AdvancedInputField instance automatically when tapping the button. Keyboard will stay visible when tapping the button.
    There also .ShouldBlockDeselect property which you can set to true to automatically reselect every time the inputfield gets deselected (for example when tapping another Selectable UI element).

    2. Haven't really tested it, but should work as it's a feature of TextMeshPro renderers.

    3. Yes, also specifically only when using TextMeshPro text renderers. Also, see the sample scene "Chat". A prebuild apk file of this scene can be found in the first post of this Thread.
     
    jiraphatK likes this.
  36. bryan_l1

    bryan_l1

    Joined:
    Apr 6, 2017
    Posts:
    12
    Thanks for clarifying. Currently my use case is mobile only so will test the plugin on iOS and Android.
     
  37. arturmandas

    arturmandas

    Joined:
    Sep 29, 2012
    Posts:
    240
    @jpienbro I am considering this asset, looks interesting. What if I need to update the app with GUI already present? Do I have to remove all InputFields or can I override them?
     
  38. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    The plugin includes a conversion tool that can convert all Unity InputFields in current scene to AdvancedInputField instances (while keeping most of the configured settings). It doesn't take any custom child objects you might have on your Unity InputField into account though.
     
  39. arturmandas

    arturmandas

    Joined:
    Sep 29, 2012
    Posts:
    240
    @jpienbro thank you very much. It does mean that child objects are kept not deleted, to be precise? Also, the converter tool is an open code or a compiled .dll?
     
  40. Studio_Weholo

    Studio_Weholo

    Joined:
    Mar 30, 2017
    Posts:
    2
    Hi @jpienbro! It's a fantastic asset!
    I just have one tiny issue and I'm not even 100% sure it has necessarily to do with the input field itself. But when trying to test the form-demoscene everything starts to glitch.
    I'm on android 9 using and Oneplus 5, Unity 2020.1.0f1, built the app in fullscreen. It does not matter if I use the canvas in overlay or camera screenspace mode.

    The issue is:
    The keyboard is sometimes partly hidden as seen in the screenshot. The dragdown menu on android and the lockscreen glitch out completely and get partly stuck. It looks like a z-fighting issue but I wouldn't know why.
    Do you have any pointers?
     

    Attached Files:

    Last edited: Jul 31, 2020
  41. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    It's an Unity Editor script (which you can execute from the topbar of the Unity Editor) and included as a cs file, so you can modify it where needed. Basically what it does is: Copy property values (& transform info) from source inputfield, spawn prefab of target inputfield (on same transform parent), apply property values & destroy source inputfield. The tool also has a toggle the keep the source inputfield after conversion.
     
  42. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Haven't seen that before on a Android device. Is this the official keyboard of that device or a third-party one? Normally the native OS keyboard should always be top-level. Rendered above Unity view.
    Haven't really tested the plugin yet in Unity 2020.1, so not sure if they changed something. Could you check if you get the same behaviour when building this in Unity 2019.4?
     
  43. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    56
    I'm also getting this error in the editor. Not when stopping Unity, but while running and using it with DoozyUI. This started happening after updating to the latest release of Advanced Input Field.

    When showing a screen containing a field:

    NullReferenceException: Object reference not set to an instance of an object
    AdvancedInputFieldPlugin.MobileTextNavigator.KeepActionBarWithinBounds ()

    upload_2020-8-3_16-24-19.png

    And then after hiding it (moves off screen) now it spams the console with constant errors:

    upload_2020-8-3_16-29-5.png

    Is there a way to prevent this from happening?

    Thanks!

    UPDATE: I seem to be able to prevent this by disabling the Action Bar checkbox on the Advanced Input Field object. That's fine for my purpose although I could see needing to be able to enable that in the future.
     
    Last edited: Aug 3, 2020
  44. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Based on your screenshot I would guess the problem would be with Canvas.worldcamera field being null. You are using a Screen Space Overlay Canvas I guess? Then I would need to add a fallback to find the camera used in case that field is null.
     
  45. arturmandas

    arturmandas

    Joined:
    Sep 29, 2012
    Posts:
    240
    Splendid, thank you very much
     
  46. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    56
    The canvas is using Screen Space Camera. But the canvas is being disabled by DoozyUI when it's hidden. I wonder if that would cause the error.
     
  47. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Does the TMP examples package currently support Unity 2020?

    System i'm currently testing
    Unity 2020.1.1
    Textmesh Pro 3.0.1
    Advanced Inputfield 1.9.8

    Update: Just tested with 2019.4.7 and Textmesh Pro 2.1.1, same error

    Empty Project, trying to test the Spellchecker Sample Scene included in the package.

    On loading the scene:
    "
    Component GUI Layer in Main Camera for Scene Assets/Plugins/Advanced Input Field/Samples/Scenes/TextMeshPro/SpellChecker.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr, Boolean&)
    "

    On Pressing Play:
    "
    IndexOutOfRangeException: Index was outside the bounds of the array.
    UnityEngine.UI.Selectable.OnDisable () (at C:/Program Files/Unity/Hub/Editor/2020.1.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Selectable.cs:523)
    AdvancedInputFieldPlugin.AdvancedInputField.OnDisable () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1348)
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr, Boolean&)
    "

    and

    "
    IndexOutOfRangeException: Index was outside the bounds of the array.
    (wrapper stelemref) System.Object.virt_stelemref_class(intptr,object)
    UnityEngine.UI.Selectable.OnEnable () (at C:/Program Files/Unity/Hub/Editor/2020.1.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Selectable.cs:493)
    AdvancedInputFieldPlugin.AdvancedInputField.OnEnable () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1342)
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr, Boolean&)
    "

    ******************************************************************************************************

    Non-TMP examples seem to work but spam the below 4 debug items every frame flooding the console.

    Error:
    "TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 28"

    Warning:
    "Internal: Stack allocator ALLOC_TEMP_THREAD has unfreed allocations, size 28"
    "To Debug, enable the define: DEBUG_STACK_LEAK in StackAllocator.h. This will output the callstacks of the leaked allocations"

    Log:
    "Allocation of 28 bytes at 000001C2F00000B0"


    It also somehow locks the folder making me unable to delete the project folder in windows explorer (i can delete everything in the project folder, i.e. Assets, Library, etc etc, just not he project folder itself.)
     
    Last edited: Aug 7, 2020
  48. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I haven't tested it yet in the newer versions of Unity, but I suspect the errors are caused by something that got changed in Unity and/or TextMeshPro.
    I'll try to test it with those Unity and TextMeshPro versions and see if I can reproduce and fix the issues.
     
  49. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    That GUI Layer error can be ignored as Unity 2020 fixes that automatically when resaving the scene.
    I could get that IndexOutOfRangeError if the TextMeshPro binding of the plugin hasn't properly been activated yet. As mentioned in the ReadMe you need to add ADVANCEDINPUTFIELD_TEXTMESHPRO to the Scripting Define Symbols in the Player Settings. Please note that Scripting Define Symbols need to be set fo each build platform you are using.

    Other TextMeshPro issue I could find was that TextMeshPro 3 was not calculating the right character index when using emojis in the Chat sample scene. To resolve that install attached patch package.
     

    Attached Files:

  50. arturmandas

    arturmandas

    Joined:
    Sep 29, 2012
    Posts:
    240
    @jpienbro could not find in the docs - how do I disable type bar inside the native keyboard? I will be using TMPro text renderers, already added proper script tag.