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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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
    I'll look into it. I don't have my test iPad with me this week, so I'll check it next week.
     
  2. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I modified the Android binding to only apply the Xiaomi fix if the device is in fullscreen mode. That Xiaomi fix doesn't seem to be necessary in non-fullscreen mode. This solves that flashy behaviour when the keyboard appears with your settings.

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

    Attached Files:

  3. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Are you planning a new release with that fix and the fix for Androind when using Unity 2019.1 ?
     
  4. MohHeader

    MohHeader

    Joined:
    Aug 12, 2015
    Posts:
    41
    I got this error today ( From Logs )
    it is totally random, and happened only once, but thought to share it

    Device Model :: samsung SM-N920C

    Code (CSharp):
    1. java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    2. android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1438)
    3. android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1456)
    4. android.app.BackStackRecord.commitInternal(BackStackRecord.java:707)
    5. android.app.BackStackRecord.commit(BackStackRecord.java:671)
    6. com.jeroenvanpienbroek.nativekeyboard.NativeKeyboard.initialize(NativeKeyboard.java:170)
    7. com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    8. com.unity3d.player.UnityPlayer.c(Unknown Source)
    9. com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
    10. android.os.MessageQueue.next(MessageQueue.java:392)
    11. android.os.Looper.loop(Looper.java:136)
    12. com.unity3d.player.UnityPlayer$e.run(Unknown Source)
    13. UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
    14. UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) (at <00000000000000000000000000000000>:0)
    15. UnityEngine.GameObject.AddComponent[T] () (at <00000000000000000000000000000000>:0)
    16. AdvancedInputFieldPlugin.NativeKeyboardManager.get_Instance () (at <00000000000000000000000000000000>:0)
    17. AdvancedInputFieldPlugin.NativeKeyboardManager.get_Keyboard () (at <00000000000000000000000000000000>:0)
    18. AdvancedInputFieldPlugin.NativeKeyboardManager.AddKeyboardHeightChangedListener (AdvancedInputFieldPlugin.OnKeyboardHeightChangedHandler listener) (at <00000000000000000000000000000000>:0)
    19. UnityEngine.GameObject:AddComponent()
    20. AdvancedInputFieldPlugin.NativeKeyboardManager:get_Instance()
    21. AdvancedInputFieldPlugin.NativeKeyboardManager:get_Keyboard()
    22. AdvancedInputFieldPlugin.NativeKeyboardManager:AddKeyboardHeightChangedListener(OnKeyboardHeightChangedHandler)
     
  5. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I could reproduce it when pressing the hide key while the keyboard is still transitioning to become completely visible. In that pending show state there wasn't any check for a keyboard cancel, so I've added it now.

    This should fix it:
    Replace the NativeKeyboard.a file in Assets/Plugins/iOS with the one in attached zip file.
     

    Attached Files:

  6. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    This fix was tested in Unity 2019.1 on a Android device.
    Latest release (1.8.3) has a package tested and submitted using Unity 2019.1, so it should work.
    In case it doesn't work:
    I didn't change any code to get it working in 2019.1, for some reason in that Unity version the NativeKeyboard.aar file didn't get included in the build sometimes. You would see errors about missing classes in the Android device log.
    I cleared the Library folder of project and used the "reimport all" option to get it included again.
     
  7. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Hi, I am testing a new project and after adding advanced input field, on android, the app crashes as soon as it opens. The Entire scene is empty except for a canvas and an advanced input field (Text Mesh Pro). It works fine in the editor with no warnings or errors.

    My current setup:
    - Unity v2109.1.5
    - DoTween Pro v1.0.155
    - Text Mesh Pro v 2.0.1
    - Advanced Input Field v1.8.3
    - Stripping Disabled

    Device:
    - Samsung S9+
    - Android Pie (9)

    Input Field Setup:
    - Select on Release
    - Move Text
    - Action Bar and Selection cursor enabled

    What I have tried:
    - Added "ADVANCEDINPUTFIELD_TEXTMESHPRO"
    - Re-import all

    Logcat:
    Code (CSharp):
    1. 06-07 13:51:41.495: I/InputMethodWrapper(16406):  call dispatchStartInputWithToken
    2. 06-07 13:51:41.495: I/InputMethodService(16406): dispatchStartInputWithToken
    3. 06-07 13:51:41.495: I/SKBD_Performance(16406): [IIManager] [PF_CL][onFinishInput] 211231
    4. 06-07 13:51:41.495: I/SKBD(16406): SamsungKeypad [IMI] onStartInput - caller pid : 31498, caller uid : 10339
    5. 06-07 13:51:41.501: I/Unity(31498): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 5625mb
    6. 06-07 13:51:41.501: I/Unity(31498): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
    7. 06-07 13:51:41.501: I/Unity(31498): ApplicationInfo com.Benny.DI version 0.1 build b7846cfd-9195-4530-bfa5-bc91fd7c589d
    8. 06-07 13:51:41.501: I/Unity(31498): Built from '2019.1/staging' branch, Version '2019.1.5f1 (6f1140cf2297)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
    9. 06-07 13:51:41.521: E/CRASH(31498): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000000
    10. 06-07 13:51:41.521: E/CRASH(31498): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    11. 06-07 13:51:41.521: E/CRASH(31498): Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    12. 06-07 13:51:41.521: E/CRASH(31498): Build fingerprint: 'samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU3CSD4:user/release-keys'
    13. 06-07 13:51:41.521: E/CRASH(31498): Revision: '26'
    14. 06-07 13:51:41.521: E/CRASH(31498): pid: 31498, tid: 31516, name: UnityMain  >>> com.Benny.DI <<<
    15. 06-07 13:51:41.521: E/CRASH(31498):     x0   0000006fcf492c60  x1   0000000000000000  x2   0000000000000000  x3   0000006fcf492d00
    16. 06-07 13:51:41.521: E/CRASH(31498):     x4   0000006fcf492d80  x5   0000000000000004  x6   000000802e033118  x7   0000000003a48673
    17. 06-07 13:51:41.521: E/CRASH(31498):     x8   0000000000000000  x9   0000006fbab62ce8  x10  0000006fb945ac08  x11  ffffffffffffffff
    18. 06-07 13:51:41.521: E/CRASH(31498):     x12  0000000000000009  x13  0000000000000061  x14  0000000000000000  x15  0000000000000140
    19. 06-07 13:51:41.521: E/CRASH(31498):     x16  000000705d4b1278  x17  000000705d3dfe70  x18  0000000000000000  x19  0000006fcf492c40
    20. 06-07 13:51:41.521: E/CRASH(31498):     x20  0000000000000bc6  x21  0000006fbac75000  x22  0000000000000bc6  x23  0000006fbac75000
    21. 06-07 13:51:41.521: E/CRASH(31498):     x24  0000006fb94170e0  x25  0000006fb945ac56  x26  0000006fba904320  x27  0000006fb945ac08
    22. 06-07 13:51:41.521: E/CRASH(31498):     x28  0000006fbac75000  x29  0000006fbd98bd30  x30  0000006fba1153dc
    23. 06-07 13:51:41.521: E/CRASH(31498):     sp   0000006fbd98bce0  pc   0000006fba1154d4  pstate 0000000060000000
    24. 06-07 13:51:41.521: E/CRASH(31498): backtrace:
    25. 06-07 13:51:41.525: I/WindowManager(6563): Cancelling animation restarting=true, leash=null, surface=Surface(name=b9ce954 NavigationBar)/@0xa4bd416, parent=Surface(name=WindowToken{143d0a7 android.os.BinderProxy@7714566})/@0xbec3197, caller=com.android.server.wm.SurfaceAnimator.startAnimation:119 com.android.server.wm.WindowContainer.startAnimation:1199 com.android.server.wm.WindowState.startAnimation:5653 com.android.server.wm.WindowState.startAnimation:5636 com.android.server.wm.WindowStateAnimator.applyAnimationLocked:1731
    26. 06-07 13:51:41.525: I/WindowManager(6563): Reparenting to leash, surface=Surface(name=b9ce954 NavigationBar)/@0xa4bd416, caller=com.android.server.wm.SurfaceAnimator.startAnimation:127 com.android.server.wm.WindowContainer.startAnimation:1199 com.android.server.wm.WindowState.startAnimation:5653 com.android.server.wm.WindowState.startAnimation:5636 com.android.server.wm.WindowStateAnimator.applyAnimationLocked:1731
    27. 06-07 13:51:41.528: E/audit(6264): type=1701 audit(1559886701.522:14365): auid=4294967295 uid=10339 gid=10339 ses=4294967295 subj=u:r:untrusted_app_27:s0:c512,c768 pid=31498 comm="UnityMain" exe="/system/bin/app_process64" sig=11

    UPDATE:
    Crashes on IL2CPP, but works fine when build with mono. Please note that my engine stripping was already disabled in IL2CPP as i saw your post in early may. Your sample scene builds in IL2CPP with TMP inputfield though, not sure why this new project fails.

    Update 2:
    Recreated the project exactly as before (its just an empty project with an inputfield anyway. hahaha) and now it compiles fine in IL2CPP... wierd...
     
    Last edited: Jun 7, 2019
  8. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    I have tried it last week and no keyboard have been shown on android phones, but on tablets it works
     
  9. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    it have not worked anyway:(
     
  10. FS9606

    FS9606

    Joined:
    Mar 12, 2015
    Posts:
    21
    Is there a way to implement auto suggestion or autosuggestion using this tool, for iOS and Android?
     
  11. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    OK...It's strange that your build works on Android tablets, but not on Android smartphones.
    Could you check the device log of those Android smartphones and see if it prints any error?
    What smartphones are you using for testing?
     
  12. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Do you mean showing the native suggestion bar above the keyboard? That can be enabled by changing the "ContentType" of the inputField to "Custom" and then change the "InputType" to "Autocorrect".

    Or do you want to write some custom code to give suggestions?
     
  13. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Not sure if this was the same as your issue, but I fixed a bug related to landscape mode which seem to happen on smartphones, but worked normally on tablets.

    See attached rar for updated Android library file.
     

    Attached Files:

  14. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    It worked for me.
     
  15. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    I have noticed several"InvalidCastException: Specified cast is not valid" several times in our log.
    Unfortunatelly, it happened during production, so i does not have specific line number.
    I have only stack trace

    AdvancedInputFieldPlugin.AdvancedInputField.OnUpdateSelected (UnityEngine.EventSystems.BaseEventData eventData) (at <61bafca6cde34c05ae86d98466188956>:0)
    UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IUpdateSelectedHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <f89a0be5f00e44b1a7fc67cb7a04c300>:0)
    UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <f89a0be5f00e44b1a7fc67cb7a04c300>:0)
    UnityEngine.EventSystems.EventSystem:Update()


    It happened on Android. Do you have any idea on cause of that?
    I am using latest version + NativeKeyboard Landscape Mode fix.rar
     
  16. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    It's really weird that it happens in that method:
    upload_2019-6-22_10-46-10.png
    This is the only cast in that method and it's within an if statement that verifies the type.

    Are you using IL2CPP as the scripting backend? Maybe that class gets converted to something that fails the type check. If this is the case it might be a bug in the Unity version you are using.
     
  17. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Hi, was wondering if t here was any way to set the press and hold time before the context menu appears as the current delay seems a tad long.
     
  18. SamuelAmco

    SamuelAmco

    Joined:
    Jun 16, 2018
    Posts:
    4
    Hi I'm building on Android Huawei P20 (soft nav bar at the bottom) and I set fullscreen mode to false on app start up. I'm getting shakey behaviour when the keyboard is opened and closed sometimes it seems to even break all together and hide the navbar when i close the keyboard. I saw that you uploaded a file called 'Non-Fullscreen Mode Fix.rar' earlier. I gave that a go but it didn't seem to make any difference. Is there anything else I can try?
     
  19. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    This can be changed in TextInputHandler.cs: The const field HOLD_THRESHOLD determines how long you need to hold to show the ActionBar.
     
  20. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Seems when you toggle fullscreen off in Unity (instead of setting the flags in Android code), the native FULLSCREEN flag is stil set.
    I worked around the issue by checking if the navigation bar was originally active when the keyboard appears and use that to determine to apply the show/hide navigation bar fix for Xiaomi phones.
    Can you verify if the attached file works for you?
     

    Attached Files:

  21. eXiz7

    eXiz7

    Joined:
    Aug 15, 2017
    Posts:
    3
    Hi! I encountered a problem with native android keyboard. The keyboard closes right after i tap anywhere outside of keyboard. I want to prevent native keyboard from closing. Does your plugin solve my problem?
     
  22. Deleted User

    Deleted User

    Guest

    @jpienbro I am considering AdvancedInputField for use in our application. The platforms currently required are:
    - Windows Desktop
    - Windows Mixed Realty Portal
    - Hololens 1
    - (Hololens 2)
    - Oculus Go

    What's the current state of support for these?
     
  23. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Hi, i needed to check it on the enviroment i did a build. Scripting backend is set to Mono actually. It happed only a couple of times. I am not able to throw it intentionally, so i have no idea.
    Unity 2019.1.0f2.
     
  24. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Yesterday, i have updated to the newest version 1.8.4. I will build it and if it happens again, i will definitelly let you know
     
  25. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Depending on your use case you can set the .ShouldBlockDeselect property to true on the AdvancedInputField instance. This blocks deselect calls of the Unity EventSystem for that instance. (It will reselect itself). Although this currently also blocks selecting other inputfields.
    Note: When pressing the done/next key on the keyboard (when that property is true) the OnEndEdit event will still be executed, but won't hide the keyboard.
    When you're done with that instance you can set that property to false again and call ManualDeselect().
     
  26. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Only Windows Desktop (on that list) at the moment is supported.
    I might add support for VR headsets in the future, but that's on long term and only the devices that are widely used and requested by multiple users.
    At my day time job we do have Oculus Go and Oculus Quest devices, but I haven't tested this plugin on those devices yet. So I don't know if they work immediately with the existing Android code of the plugin.
    Unfortunately Hololens is a bit too expensive for me as an individual. Especially if it's only for adding support for this plugin.
     
  27. Deleted User

    Deleted User

    Guest

    Ok, thanks for the answer.
    Is your plugin easily enough extendable that I could do this?
     
  28. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    All platforms (except Windows standalone) have a specific class that inherits from the NativeKeyboard base class which contains the methods needed to send data back & forth between Unity and the native binding. There also a SimulatorKeyboard class (that inherits from NativeKeyboard) which shows how to implement this with an Unity UI Canvas. That class is used for mimicing the native Android keyboard from within the Unity Editor.
    Other than that you probably would need some pointer class to interact with UI elements within an Unity Canvas. You might already have experience with this if you have worked with VR headsets before.

    Anyways, you can ask for a refund within 2 weeks after purchase if I you can't have make it work for your app.
     
    Deleted User likes this.
  29. SamuelAmco

    SamuelAmco

    Joined:
    Jun 16, 2018
    Posts:
    4
    Late reply but that worked. Thank you!
     
  30. Vasilis-Mbakalis

    Vasilis-Mbakalis

    Joined:
    May 23, 2017
    Posts:
    16
    Hello!Im creating an app for both iOS and android.I have created a login screen with username and password input fields. Is there a way the password input field can support ios password manager?
     
  31. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    According to the official docs: https://developer.apple.com/documentation/security/password_autofill/ you will need to setup "App's Associated domains" in Xcode and on your own website/domain server. I don't have a web domain/server myself, so I can't really test this.
    It looks like the password fields in the plugin already allow selecting a password from the keychain. Although the user would still need to manually copy and paste the password since it doesn't know which password belongs to the app.
     
  32. OnePhase

    OnePhase

    Joined:
    Jul 17, 2019
    Posts:
    2
    Anyone knows how to change the color of the background when the inputfield is not interactable.
    Looks like is always grey and we want to change it to match the colors of our app.

    Regards.
     
  33. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    This should show the normal & disabled color property in the inspector:
    In Assets/Plugins/Advanced Input Field/Editor replace the AdvancedInputFieldEditor.cs file with the attached file.
     

    Attached Files:

  34. OnePhase

    OnePhase

    Joined:
    Jul 17, 2019
    Posts:
    2
    When i replaced the file, there were some errors related to DrawLineLimitProperty and the limit properties in general, so i reverted back to the old script (fortunately i had a back up file of the .cs) then i just merge the changes i saw related to the interactable property and looks like that make the trick.

    Thank you!
     
  35. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    Oh, that line limit property is a new property for next major release, didn't notice it was already enabled there.
    Anyways, glad you could fix it yourself by finding the changes needed.
     
  36. eXiz7

    eXiz7

    Joined:
    Aug 15, 2017
    Posts:
    3
    Hi! Is there a way to use animated Emojis with Advanced Input Field?
     
  37. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    No, not at the moment.
    This plugin uses TextMeshPro to render static emojis, but afaik TextMeshPro doesn't have support for rendering animated emojis yet.
     
  38. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    The keyboardscroller currently requires 1 script on every scroll view, and i also have to enable disable the appropriate keyboard scroller as i change my scroll views.

    Maybe a better way might be to make the keyboardscroller get the parent scrollview of an input field, as this would mean only 1 keyboardscroller would be needed in the scene.

    Will also need to disable the contentsizefitter component when opening keyboard and reenableing it when closing keyboard it this component is used..
     
  39. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I'll note these remarks down for now. I'll look into rewriting or improving the autoscroll in the future, but it doesn't really have a high priority atm. Current implementation requires changing the content size to make sure the scrollview can always scroll (also when the inputfield is completely at the top or bottom of the scrollrect).
    You're free to try to implement it in another way. The OnKeyboardHeightChanged event can be used to know when the keyboard appears/disappears and how many pixels it occupies.
     
  40. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Hi, sorry to bother you again, is there anyway to enable the selection cursors for standalone platforms?

    Also is there any way to change their behaviour in standalone builds to be closer to a traditional input field? For example, currently, for drag mode, we currently have update text selection OR move text. However, in normal applications, if we drag horizontally, it selects text and vertically updates the selection or if no selection is made, it moves the text. Currently in advanced input field, its an either or situation, no way to get both.

    Lastly, 1 minor bug regarding the selections cursors is that they are rendered even then they are above or below the visible area of the input-field

    Thank you very much for your help!
     
  41. JovanStojsic

    JovanStojsic

    Joined:
    Jan 8, 2019
    Posts:
    5
    Last edited: Aug 6, 2019
  42. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I've responded to your email
     
  43. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    The selection cursors are mobile only atm. On Standalone platforms they normally aren't necessary, because the user normally uses a mouse on those platforms.

    Currently there is no way to do both drag behaviours.
    Do you have an example of an application that does it this way? The text editors I currently have installed on my PC all seem to just update the text selection when dragging horizontally or vertically.
     
  44. SerbSGI

    SerbSGI

    Joined:
    Nov 17, 2017
    Posts:
    1
    Good day. Do I need to uninstall the previous version of the library when upgrading?
    I have a problem with build on IOS after update:

    Showing Recent Messages

    :-1: 96 duplicate symbols for architecture arm64

    duplicate symbol _OBJC_CLASS_$_NKBCharacterRule in:

    Libraries/Plugins/iOS/NativeKeyboard.a(NKBCharacterRule.o)

    Libraries/Plugins/IOS/NativeKeyboard.a(NKBCharacterRule.o)

    duplicate symbol _OBJC_METACLASS_$_NKBCharacterRule in:

    Libraries/Plugins/iOS/NativeKeyboard.a(NKBCharacterRule.o)

    Libraries/Plugins/IOS/NativeKeyboard.a(NKBCharacterRule.o)

    ---- and other

    ld: 96 duplicate symbols for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
  45. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I just tested the version currently in the AssetStore in a clean Unity project and don't encounter any errors when running or archiving an iOS build, so maybe there are still some old files in your Unity and/or XCode project.
     
  46. JovanStojsic

    JovanStojsic

    Joined:
    Jan 8, 2019
    Posts:
    5
    Just to note that I am experiencing the same issue, but the scripts did not solve the problem.
    Unity 2017.4.29, empty project, just added the plugin and build the "Frame" scene.
    NullReferenceException at AdvancedInputFieldPlugin.UWPKeyboard.TryGetPanel()
    Trying to debug in visual studio gets me to UWPKeyboard / TryGetPanel / line Window window = Window.Current;
    This returns null
     
  47. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    You probably have the build type set to D3D instead of XAML.
    That should fix that line, but will give an exception when trying to create an instance of a class in the native uwp dll for some reason in that Unity version. Probably something Unity or Microsoft has changed :|. This unfortunately has happened multiple times already that previously working code gets broken by an update. UWP tends to be more unstable than other platforms in my experience.
    Anyways I haven't found a way to get my dll code working again in that version of Unity. Those slow IL2Cpp build times are not really helping either.

    Update: Seems to work in newer version of Unity (Unity 2019), on older versions IL2Cpp crashes on a class that inherits from a system UWP class. Maybe it doesn't get converted properly by IL2Cpp in the older versions of Unity.
     
    Last edited: Sep 2, 2019
  48. fennecx_development

    fennecx_development

    Joined:
    Sep 24, 2014
    Posts:
    427
    I'm on holiday until 1 September, so responses might be delayed.
     
  49. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Hi @jpienbro ,
    sometimes, when we switch scenes, this happens:
    Code (CSharp):
    1. MissingReferenceException: The object of type 'AdvandcedInputField' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. AdvancedInputFieldPlugin.AdvancedInputField.get_PlaceholderTextRenderer () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:465)
    4. AdvancedInputFieldPlugin.AdvancedInputField.UpdateVisibleTextRenderers () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1801)
    5. AdvancedInputFieldPlugin.AdvancedInputField.GetActiveTextRenderer () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1818)
    6. AdvancedInputFieldPlugin.AdvancedInputField.UpdateActiveTextRenderer () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1837)
    7. AdvancedInputFieldPlugin.AdvancedInputField+<InitialTextRendererFix>d__288.MoveNext () (at Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:1663)
    8. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
    I do not know, which Input does it (we have a couple of them, which are persistent within scenes).
    Do you have any idea, what is the cause and how to solve it?

    I have found another issue, here is stacktrace. This happens within scene switch, rarely
    Code (CSharp):
    1.  
    2. UnityEngine.Component.GetComponentsInChildren[T] (System.Boolean includeInactive) (at <8015ab56f7e04f71ba206edc0fdf5339>:0)
    3. UnityEngine.Component.GetComponentsInChildren[T] () (at <8015ab56f7e04f71ba206edc0fdf5339>:0)
    4. AdvancedInputFieldPlugin.AdvancedInputField.IsInputFieldButtonSelected () (at D:/projects/bglab.uwp.development/Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:2279)
    5. AdvancedInputFieldPlugin.AdvancedInputField+<DelayedDeselect>d__318.MoveNext () (at D:/projects/bglab.uwp.development/Assets/Plugins/Advanced Input Field/Scripts/InputField/AdvancedInputField.cs:2302)
    6. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <8015ab56f7e04f71ba206edc0fdf5339>:0)
     
    Last edited: Aug 30, 2019
  50. SonsOfABit

    SonsOfABit

    Joined:
    Mar 31, 2018
    Posts:
    3
    Hello!

    We've just purchased this asset. Everything is working perfectly but the emojis. We tested the 'chat' apk example before buying and it was recognizing and showing the emojis characters (we've bought the asset because of that). Are the emojis working? Do we have to change the font or enable any options?

    Thanks in advance.