Search Unity

Advanced Input Field 2

Discussion in 'Assets and Asset Store' started by fennecx_development, Dec 25, 2020.

  1. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Version 2.1.5 is pending release on the Asset Store:
    • Bugfix: Fixed invalid string issue when setting text containing emoji from code
    • Bugfix: Fixed issue that keyboard didn't hide when selected inputfield was getting destroyed
    • Bugfix: Changed KeepActionBarWithinBounds() method to calculate in screen space to fix issues with camera offsets
    • Bugfix: Fixed ActionBar not showing when holding when the cursor is currently next to space character or other special character
    • Bugfix iOS: Fix to make some autofill iOS inputfields accept third party keyboards too
    • Bugfix Standalone: Fixed OnTextTap event not triggered on Standalone platform
    • Feature: Added "selectionBehindText" property to control whether the text selection should be rendered behind or in front of the text
    • Feature: Implemented emoji character limit filter
    • Feature: Added PasswordMaskingCharacter property to GlobalSettings
    • Feature: Added OnActionBarAction event
     
    reality_marcin likes this.
  2. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @fennecx_support
    One huge painpoint with plugin is that it doesnt compile for WebGL. I understand you dont support WebGL as webGl require other features. however not letting app build for that (and fall backing to unity input field is a huge issue in crossplatform dev)
    Please advise
     
  3. NEUNEU9

    NEUNEU9

    Joined:
    Sep 8, 2019
    Posts:
    3
    Hello! Thank you for your wonderful work.
    I've found that using this with InputSystem (InputManager disabled) raises an exception.

    upload_2022-2-8_14-20-50.png

    Versions:
    • Unity: 2020.3.25f1
    • InputSystem: 1.2.0
    • Advanced Input Field 2: 2.1.4
    Steps to reproduce:
    1. Install InputSystem and disable InputManager
    2. Create InputField with TextMeshPro Text
    3. Run Unity, type characters and then drag
    4. The following exception appears in the log
    Code (CSharp):
    1. InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    2. UnityEngine.Input.get_mousePosition () (at <9129caca836046fd844f877f14792ee8>:0)
    3. AdvancedInputFieldPlugin.InputFieldEngine.UpdateDrag () (at Assets/AdvancedInputField/Scripts/InputField/InputFieldEngine.cs:1397)
    4. AdvancedInputFieldPlugin.InputFieldEngine.OnUpdateSelected (UnityEngine.EventSystems.BaseEventData eventData) (at Assets/AdvancedInputField/Scripts/InputField/InputFieldEngine.cs:1373)
    5. AdvancedInputFieldPlugin.AdvancedInputField.OnUpdateSelected (UnityEngine.EventSystems.BaseEventData eventData) (at Assets/AdvancedInputField/Scripts/InputField/AdvancedInputField.cs:2049)
    6. UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IUpdateSelectedHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:99)
    7. UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:262)
    8. UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)
     
  4. NEUNEU9

    NEUNEU9

    Joined:
    Sep 8, 2019
    Posts:
    3
    I temporarily avoided it by rewriting the code as follows:
    Line 1397 of InputFieldEngine.cs

    Code (CSharp):
    1. RectTransformUtility.ScreenPointToLocalPointInRectangle(textAreaTransform, Input.mousePosition, InputField.GetComponentInParent<Canvas>().worldCamera, out localMousePosition);
    ->
    Code (CSharp):
    1. RectTransformUtility.ScreenPointToLocalPointInRectangle(textAreaTransform, new PointerEventData(EventSystem.current).position, InputField.GetComponentInParent<Canvas>().worldCamera, out localMousePosition);
     
  5. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    It should be able to build for WebGL, but you might need to enable this option in Assembly Definition file:
    upload_2022-2-8_19-20-54.png
    This file is located at Assets/AdvancedInputField/AdvancedInputField.asmdef

    WebGL builds will fallback to the StandaloneKeyboard. When using the browser on a Standalone this should take the input from the hardware keyboard. On mobile browsers this will not work, because it can't execute platform specific native code from within Unity WebGL.
     
  6. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Thank you for reporting, I'll check if I can detect whether the new or old InputSystem is being used.
     
    NEUNEU9 likes this.
  7. PrisedRabbit

    PrisedRabbit

    Joined:
    Aug 14, 2012
    Posts:
    63
    Is it possible to make fallback to TextMeshPro inputfield for WebGL builds? Or how to keep virtual keyboard in WebGL builds?
     
    Last edited: Feb 11, 2022
  8. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @fennecx_support
    How do i make a custom character validator where user is only able to enter lowercase alphabets (user can enter capital but they turn into lowercase) and then user can either in the middle or end add numbers, but not in start
    Please advise
     
  9. PrisedRabbit

    PrisedRabbit

    Joined:
    Aug 14, 2012
    Posts:
    63
    Check Sample scene LiveProcessing
     
    jGate99 likes this.
  10. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @fennecx_support
    For a change password screen,
    what "content type" should i set for Old Password (i know its password),
    BUT what about "New Password" and "Confirm New Password" field?
     
  11. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    41
    Hi @fennecx_support

    I bought your AIF asset yesterday and it looks great, but I have a problem with screen resizing that I haven't been able to solve after playing around an entire day.

    I have an app with multiple screens. The root of each screen is a canvas component that also has a Canvas Scaler:

    upload_2022-2-13_12-1-28.png

    Now, when I add an Advanced Input Field to a page, then on my Android phone, the entire page will resize to fit within the area above the keyboard whenever the keyboard is on the screen, if you see what i mean (otherwise i can provide a screenshot). I didn't have this problem with the Unity Input Field.

    I figured out that this happens because Screen.height changes when the keyboard is on the screen, subtracting the part that contains the keyboard. And that triggers the Canvas Scaler to squeeze everything into the visible area above the keyboard.

    Is there any way to turn off this screen resizing behavior in AIF? Removing the Canvas Scaler or changing its settings is not really an option, because that would require redesigning a lot of other parts of the app.

    EDIT: In the Unity editor, the behavior is as i would like it, with the (simulated) soft keyboard 'on top of' my page and without the page resizing.

    Thanks!
     
    Last edited: Feb 13, 2022
  12. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    emoji remove issue is fixed now thank you last issue i am fetching i am trying to add emoji but it's display # sigh emoji please check below screenshot. please let me know how can i fixed this issue
    thank you
     

    Attached Files:

  13. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    also check i am trying to add emoji is display like this full string
     

    Attached Files:

  14. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Fallback to TextMeshPro inputfield would be difficult, because that uses different gameobjects and properties.
    I had an user before that just used the SimulatorKeyboard class (the keyboard that appears when running in Unity Editor) on WebGL builds by changing the preprocessors in the NativeKeyboardManager.cs Awake() method. That's the place where the keyboard instance for a specific platform gets created.
     
    PrisedRabbit likes this.
  15. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    You can just set them all to use the "PASSWORD" content type.
    Optionally you can also set the "Autofill Type" to "NEW_PASSWORD" (on "New password" and "Confirm new password" inputfields) to give the native Android/iOS Password Manager a hint that you're entering a new password.
    (See the Autofill sample scene)
     
  16. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    If you only have this issue on Android, it usually occurs because of a Android full screen mode setting.
    Are you maybe changing the fullscreen mode from code or do you have a custom AndroidManifest.xml file?
     
  17. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Do you have an example of an emoji string that you are trying to set?
    Could you also check if the Chat sample scene is working normally for you (that can you insert different emojis)?
    I've quickly tested this code in the Chat scene:
    Code (CSharp):
    1. messageInput.Text = "";
    And this displays as expected in that scene.

    EDIT: Seems like Unity Forum is removing my emojis from above C# code.
    Anyways I've just copied several emoji characters from here: https://github.com/anton-bot/Full-Emoji-List/blob/master/Emoji.cs and used those in the string.
     
  18. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    If you're adding the emojis as rich text (format: <sprite name = "">) you should use the .RichText property instead.
     
  19. Mekumyanov

    Mekumyanov

    Joined:
    Mar 31, 2017
    Posts:
    7
    Hi, in 2.1.5 my problem was fixed. But I discovered a new problem, the size of the ActionBar for some reason depends on the TargetDpi, if the ResolutionScalingMode is set to FixedDpi. I attached an example below where the target dpi is 275. And this only happens on the device. Is it possible to fix this?
    OS: Android
    Unity 2019.4.35
     

    Attached Files:

  20. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    i have check with RichText enable and assign Richtext file but still fetching same issue. please check below Screenshot and let me know how can i fix this issue thank you.
     

    Attached Files:

    • s2.PNG
      s2.PNG
      File size:
      197.8 KB
      Views:
      268
    • s3.PNG
      s3.PNG
      File size:
      261.1 KB
      Views:
      262
  21. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    41
    Thanks for the prompt response! I have only tested on Android and Unity Editor so far, but indeed have the Fullscreen option checked in Android. I also use a custom manifest. I'll check tomorrow if I can fix it by turning off fullscreen (and if this doesn't screw up anything else) or by changing the manifest file (what should i look for there?)
     
  22. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    i am waiting for you replay please give me some solution how can i fix this issue. thank you
     
  23. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    I meant using the .RichText property instead of the .Text property from code when setting your string with emojis. For example:
    Code (CSharp):
    1. messageInput.RichText = "Some emoji <sprite name=\"1f36d\"> and another emoji <sprite name=\"1f36f\">";
    Will display this:
    upload_2022-2-17_19-22-33.png
     
  24. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    In the manifest file check if "android:windowSoftInputMode" is specified. That controls the resize behaviour when keyboard appears.
     
  25. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    The ActionBar (and the Mobile Touch Cursors) try to size themselves based on physical average thumb size (to avoid the situation that they would become huge on tablets). So they should be around the same size physically on both Smartphones and Tablets.
    This relevant code is in the UpdateSize() method in ActionBar.cs.
    There it tries to get the physical average thumb size (when running on Android device). In the Editor/Standalone it uses a fallback value, since it can't determine dpi on Editor/Standalone.
    If you want to same behaviour as in the Editor just remove the preprocessor for Android and let it use the fallback value.
     
  26. Mekumyanov

    Mekumyanov

    Joined:
    Mar 31, 2017
    Posts:
    7
    Hi, thanks for the reply
    I didn't quite understand how to turn off the preprocessor.
    And our problem is not that the behavior of the editor and the device are different, but that at different dpi but in the same canvas sizes, the action bar has different sizes.
    As an example, I threw off two screenshots. The first dpi is set to 275(Resolution Scaling Mode - Fixed Dpi) and the second dpi is not set(Resolution Scaling Mode - disabled).
    And both screenshots are taken from the device. We would like the size of the action bar to be the same as in the second screenshot regardless of the dpi
     

    Attached Files:

  27. romi-fauzi

    romi-fauzi

    Joined:
    Aug 16, 2013
    Posts:
    161
    @jpienbro, @fennecx_support , just want to check, does this plugin character limitations works when the input field is set to multiline? Thanks
     
  28. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    i have create emoji asset and then after emoji display perfect but i have close unity project and then after reopen project and check emoji display with # sign. how can i fix this
     

    Attached Files:

    • s15.PNG
      s15.PNG
      File size:
      205.6 KB
      Views:
      263
    • s16.PNG
      s16.PNG
      File size:
      205.5 KB
      Views:
      245
    Last edited: Feb 18, 2022
  29. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    i have set character limit as 50 character it's working without enable Emoji Allowed. but i am trying to enable Emoji Allowed character limit is not working i have input more then 50 character.
    please check and let me know what is the issue and how can i fix this
     
    Last edited: Feb 18, 2022
  30. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Seems like Unity messes up reported screen values when using that resolution scaling mode. Screen.width and Screen.height get updated, but unfortunately Screen.dpi just reports the default DPI of the device.
    So to counteract the behaviour I changed the DeterminePhysicalScreenSize() in Util.cs to this:

    Code (CSharp):
    1. public static float DeterminePhysicalScreenSize()
    2.         {
    3.             if(Screen.dpi <= 0)
    4.             {
    5.                 return -1;
    6.             }
    7.  
    8.             float targetDPI = 270; //This should be the same as the target DPI in the Player Settings
    9.             float width = Screen.width / targetDPI;
    10.             float height = Screen.height / targetDPI;
    11.             float screenSize = Mathf.Sqrt(Mathf.Pow(width, 2) + Mathf.Pow(height, 2));
    12.  
    13.             return screenSize;
    14.         }
    And on all the places the OnKeyboardHeightChanged event callback gets used you need to add this as the first line in the body of the callback method:
    Code (CSharp):
    1.  
    2. #if !UNITY_EDITOR
    3.           keyboardHeight = Mathf.RoundToInt(keyboardHeight * (270 / Screen.dpi)); //270 is the target DPI
    4. #endif
    5.  
    NOTE: Added a preprocessor around this line, so it will only be executed in actual builds

    For example to make the KeyboardScroller component working again (in case you are using this component):
    In KeyboardScroller.cs change to OnKeyboardHeightChanged method to this:
    Code (CSharp):
    1.  
    2. public void OnKeyboardHeightChanged(int keyboardHeight)
    3.        {
    4. #if !UNITY_EDITOR
    5.            keyboardHeight = Mathf.RoundToInt(keyboardHeight * (270 / Screen.dpi)); //270 is the target DPI
    6. #endif
    7.  
    8.            if(keyboardHeight > 0)
    9.            {
    10.                ScrollContent(keyboardHeight);
    11.            }
    12.            else
    13.            {
    14.                ScrollBack();
    15.            }
    16.  
    17.            lastKeyboardHeight = keyboardHeight;
    18.        }
    19.  
    Unity unfortunately doesn't have a property for actual DPI used, so you will need to hardcode the target dpi this way.
     
    Last edited: Feb 20, 2022
  31. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Yes, the character limit also works in multiline mode.
     
    romi-fauzi likes this.
  32. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Hmm, that's strange. Haven't seen that behaviour before when closing and reopening Unity Editor. Are you trying to immediately set the text on Awake()? Maybe the emoji asset or TextMeshPro isn't fully initialized at that point, because it seems to pick the first emoji sprite (maybe a fallback of TextMeshPro).
     
  33. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Emojis don't work with the hard character limit, because emojis themselves are collections of characters and it would corrupt the string if part of the emoji characters would be removed.

    You can however use the EmojiCharacterLimitFilter (LiveProcessingFilter) to count an emoji as 1 character.
    Just add the component the AdvanedInputField gameobject and assign it as LiveProcessingFilter:
    upload_2022-2-20_11-20-4.png
     
  34. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    @fennecx_support How can i set live processing filters and character validators on runtime, by scripting
     
  35. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    You should be able to change them by using the .LiveProcessingFilter and .CharacterValidator properties on an AdvancedInputField instance.
    for example:
    Code (CSharp):
    1. inputfield.LiveProcessingFilter = <reference to your LiveProcessingFilter>;
     
  36. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    no i have not trying to immediately set the text on awake. adding text after 30 sec to 1 min so i think not issue on initialized please check again i think you find another solution.
    thank you
     
  37. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    Action bar enable false but i am typing something and type space then after pressing long key paste and select all action bar visible i think Action bar Enable false then not showing any action bar
     

    Attached Files:

    • s17.PNG
      s17.PNG
      File size:
      191 KB
      Views:
      253
  38. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    can we have fix copy paste start selection and end selection drag point only inside input field not drag outside input field please check attachment video. if you have any solution then let me know
    thank you
     

    Attached Files:

  39. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Unfortunately I can't reproduce the issue myself when restarting the Unity Editor. Would it be possible to make a small repro project that shows the issue and send that project to me?
     
  40. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    I could reproduce the issue and fixed it by changing the OnHold() method in TextInputHandler.cs to this:

    Code (CSharp):
    1. internal virtual void OnHold(Vector2 position)
    2.         {
    3.             if(InputField.Text.Length > 0)
    4.             {
    5.                 TextNavigator.SelectCurrentWord();
    6.                 if(!Engine.HasSelection && InputField.CanUseActionBar) //Just show the ActionBar when no word was selected
    7.                 {
    8.                     if(TextNavigator.ActionBar == null)
    9.                     {
    10.                         InitActionBar(Engine);
    11.                     }
    12.                     TextNavigator.ShowActionBar();
    13.                 }
    14.             }
    15.             else if(InputField.CanUseActionBar)
    16.             {
    17.                 if(TextNavigator.ActionBar == null)
    18.                 {
    19.                     InitActionBar(Engine);
    20.                 }
    21.                 TextNavigator.ShowActionBar();
    22.                 if(!Engine.EditMode)
    23.                 {
    24.                     TextNavigator.KeepActionBarVisible = true; //Workaround to keep the ActionBar visible when beginning edit mode
    25.                 }
    26.             }
    27.         }
     
  41. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    This behaviour is controlled by the "Cursors Clamp Mode":
    upload_2022-2-23_20-58-32.png
    You can change it to make the cursors stay within the (current) text bounds or the inputfield bounds.
     
  42. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    Please check this link and get Demo project and check you Chat scene https://KeshavGameHead@bitbucket.org/KeshavGameHead/emojidemo.git
     
  43. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
    thank you it's working not moving outside input field. i have check both option but i am getting this issue. if you able to fix this issue then let me know. courser is moving outside text
     

    Attached Files:

  44. ian-phoria

    ian-phoria

    Joined:
    Oct 27, 2019
    Posts:
    3
  45. aleksandr_kharitonov

    aleksandr_kharitonov

    Joined:
    Nov 7, 2017
    Posts:
    1
    Hi!
    NativeKeyboardManager gives incorrect keyboard size for iOS devices.
    I want to slide the input field up when the keyboard appears so that the input field appears exactly above the keyboard (without gap). But because NativeKeyboardManager gives wrong keyboard size, gaps appear or the keyboard overlaps the input field.
     

    Attached Files:

    • 111.PNG
      111.PNG
      File size:
      91.3 KB
      Views:
      259
  46. Riken_rds

    Riken_rds

    Joined:
    Apr 4, 2017
    Posts:
    49
  47. Mekumyanov

    Mekumyanov

    Joined:
    Mar 31, 2017
    Posts:
    7
    Hi, thanks for help
    its working
     
  48. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Seems like in that Unity version the emoji asset isn't saved correctly when closing Unity.

    I've changed the SaveSpriteAsset() method in EmojiAssetGenerator.cs to this:
    Code (CSharp):
    1.         private void SaveSpriteAsset(string filePath)
    2.         {
    3.             filePath = filePath.Substring(0, filePath.LastIndexOf('.'));
    4.  
    5.             string dataPath = Application.dataPath;
    6.  
    7.             if(filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1)
    8.             {
    9.                 Debug.LogWarning("You're trying to save the emoji asset in a directory outside of this project folder. This is not supported.");
    10.                 return;
    11.             }
    12.  
    13.             string relativeAssetPath = filePath.Substring(dataPath.Length - 6);
    14.             string directoryName = Path.GetDirectoryName(relativeAssetPath);
    15.             string fileName = Path.GetFileNameWithoutExtension(relativeAssetPath);
    16.             string pathNoExt = directoryName + "/" + fileName;
    17.  
    18.             emojiAsset = CreateInstance<TMProEmojiAsset>();
    19.             AssetDatabase.CreateAsset(emojiAsset, pathNoExt + ".asset");
    20.  
    21.             emojiAsset.hashCode = TMP_TextUtilities.GetSimpleHashCode(emojiAsset.name);
    22.             emojiAsset.spriteSheet = spritesheet;
    23.             emojiAsset.spriteInfoList = spriteList;
    24.             AddDefaultMaterial(emojiAsset);
    25.  
    26.             FieldInfo versionField = typeof(TMP_SpriteAsset).GetField("m_Version", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
    27.             if(versionField != null)
    28.             {
    29.                 versionField.SetValue(emojiAsset, string.Empty);
    30.             }
    31.  
    32.             FieldInfo emojisField = typeof(TMProEmojiAsset).GetField("emojis", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
    33.             if(emojisField != null)
    34.             {
    35.                 emojisField.SetValue(emojiAsset, emojis);
    36.             }
    37.  
    38.             emojiAsset.UpdateLookupTables();
    39.  
    40.             List<TMP_SpriteCharacter> characters = emojiAsset.spriteCharacterTable;
    41.             int length = characters.Count;
    42.             for(int i = 0; i < length; i++)
    43.             {
    44.                 characters[i].glyphIndex = (uint)i;
    45.             }
    46.  
    47.             EditorUtility.SetDirty(emojiAsset);
    48.             AssetDatabase.SaveAssets();
    49.         }
    This seems to make Unity save the generate emoji asset correctly.
    You do need to regenerate your emoji asset after these changes. (using Tools => Advanced Input Field => Emoji Asset Generator)
     
  49. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    The copy, cut, paste, select all.. options are controlled by the ActionBar properties on an AdvancedInputField instance. For example see the username inputfield in the sample scene "Chat".
    upload_2022-3-1_20-22-42.png

    When selecting text by double tapping or dragging across text it will show the ActionBar above selected text. You can also tap the blue cursor to show the action bar and for example paste text at current text position.
     
  50. fennecx_support

    fennecx_support

    Joined:
    Dec 28, 2020
    Posts:
    133
    Did you divide the keyboard height by the Canvas.scaleFactor? The keyboard height reported by that event is in Screen pixels, so you have to divide it by the Canvas.scaleFactor to get the value in Canvas pixels.