mopsicus / umi

Unity mobile input (UMI) plugin for Android and iOS, allows to use features of mobile native input fields
MIT License
398 stars 92 forks source link

[Fix] _isFirstCreation from #94 causing duplicate field creations #111

Closed VanIseghemThomas closed 3 months ago

VanIseghemThomas commented 5 months ago

Tested and fixed on iOS.

Adding logs in Start, OnEnable and InitProcess reveals that in some cases InitProcess is called twice. Thus resulting in CreateNativeEdit also being called twice. Moving the input field position also reveals that multiple input fields where in fact created.

How I discovered / how to reproduce:

This is a strange flow but the only one I can find currently to reproduce the issue and verify it's fixed.

VanIseghemThomas commented 5 months ago

Unrelated, there is also an issue with the application focus causing the input fields to go readonly and disable text. Have not looked into it yet since I patched this on the app side of things for my project. Thought it would be good to let you guys know.

Update: Created PR for this https://github.com/mopsicus/umi/pull/112

VanIseghemThomas commented 3 months ago

Update: ripped off in https://github.com/mopsicus/umi/commit/ff3495795c228c69483001ad4077368e67945952