-
Notifications
You must be signed in to change notification settings - Fork 13
Multi Line Support in Inputfield #39
Comments
Hi ATHellboy! The original plugin where we forked from had some support for multiline text fields but we haven't been using those ourselves so yeah it's likely that there are some bugs (and we might even have broken more things with those with our changes). I think the multiline code is still in the project so you could try to fix issues yourself, that might be the quickest route. We're not planning to use multiline fields ourselves, so we're likely not looking into that in the near future. I might investigate it on my free time at some point, but I'm not making any promises :) |
Many thanks Hemalloe |
Hey, The input field is controlled by sending Json file to the plugin ? I've seen in NativeEditBox which multi line attribute of input field is sent to the plugin like other attributes. I try to dig in codes and find differences between these codes and original ones and I've not found anything special just one thing that i guess maybe it is important part of multi line feature. The difference which is in my mind is Do you have any idea about that ? Unfortunately I've not tested original code to determine that multi line works or doesn't. Many thanks |
I think this should catch the enter presses the same way, we just thought it was cleaner to compare directly to the character. |
Could you describe what kind of problems you have with the multiline input fields? |
Multiline doesn't work in input fields.When i choose multiline from combo box in inspector of input field component, It doesn't change anything in android build. It works in editor but not android build. Actually in android build, multiline input fileds are like single ones. |
I've checked original code that you fork from it. I don't know why, but the native input field didn't work. |
Anyone ? |
Yeah, I don't know if the original developer then tested the multiline stuff either. I can see that there are some things done differently if a As said earlier I might investigate the multiline problems at some point in the future, but if you need it in your project and want to use this plugin I recommend trying to investigate the issue yourself. I'm more than happy to integrate a fix if you manage to find one. |
Thanks Hemaolle, I try to investigate about multiline but I asked just because you and other contributes know the codes and plugin more than me. I've checked the original one but I think i need to recheck it again and I'll let you know for the result. |
Yeah, no problem :) Let me know how it goes! |
Yup, I've had some mistakes for checking the original one, I've tested it and multiline works very well but until now I didn't find any solution for this version. |
Not having the return button sounds like a problem in either setting the texfield to multiline (maybe the setting gets reset after it's set by something else we do) or the IME (keyboard) options or similar. I think we maybe added the possibility to have a "Done" or "Next" button on the keyboard so maybe that affects the presence of the return button. |
Excuse me for latency. Yup, I think it is reset by something so I guess maybe it is because of return keys because multiline textfiled need next line button but it doesn't exist. Default return key returns what kind of return key ? just next and done ? Is there any way to add next line key to the return keys option ? Many thanks |
Not sure if the return key is an option like the "Next" and "Done" keys or if it's just dependent on having a multiline input field. |
It's selectable in editor, I'm not sure it depends on type of inputfield, but in original code, it depends. if it is multiline, return key is next line, if it is single, return key is done. |
Yeah, I'm not that familiar with Android keyboards that I wold remember by heart how it works :) |
Is there any way to disable (comment) some of attributes of EditBoxConfig ? I try to do but the inputfield disables. |
Multiline support is also something I'm very interested in. So far there seems to be 3 caveats which stop this plugin being perfect:
I think I can solve 2) by putting an invisible panel somewhere on screen which detects being pressed and auto sets the focus off of the InputText. Annoying to have to do but a workaround As for 3, I'm thinking every time the native text isn't in focus, I will swap it out for a standard input field with the same value. Issue 1) however, would benefit much more from an in-code fix than the other two. I'm going to have a look at this at some point in the next few days but if anyone else solves it, I'd love to see their solution :) |
Oh it's so good Chazzmundo. today I've tried to find difference between native plugin codes of original one and this one. Now I want to learn how to modify native android codes. |
Hey, so it turns out another user also had the same problem regarding the multiline issue but managed to solve it. I've verified it locally and it works nicely. Simply go to your InputField script, change the Content Type to "Custom" and ensure the Line Type is "Multi Line Newline". If I get some time in the future, I'll look into why this doesn't work as standard without having to set it to a Custom Content type as well as try and fix the other 2 issues I raised properly. Source of fix (in the closed issues list ^_^): #31 |
Hey guys, I want to add auto alignment to input field. First I've tried to use this piece of code that I've wrote :
It works in editor very well, but doesn't work on android device. I guess it because of plugin that controls all stuffs in inputField. So I try this code and nothing work yet :
Determining text anchor works very well, but I think it doesn't send to the plugin, because nothing changed in inputField. Is there any problem for sending ? Do you have any idea how to create auto alignment according to RTL or LTR language ? |
I've fixed auto align and multiline for all kind of content type. Now my problem is cursor (caret), It doesn't appear on input field. Any idea ? Fix for multiline:
Fix for auto align:
|
Looks great! Perhaps you could make a fork of the repository and then you could make a pull request for the multiline fix to incorporate it in our version? Not sure what could be the problem with the caret :/ Is it broken always or only with multiline? |
Yes, of course. It is broken always. I've not found problem yet. |
Hey,
Is this modified inputField support multi line submit and multi line newline ?
I've checked these items and unfortunately just support single line ?
Any suggestion to fix this issue ?
I've had RTL languages problem in Unity and this package solve my problem. I've test many packages and codes but all of them have problem in some situation.
Many thanks,
Alireza
The text was updated successfully, but these errors were encountered: