The library has UiInputField.value which is the property that should be used to read the value: https://playcanvas.com/editor/code/1005906?tabs=109692056
The HTML input field should not be used to read the value of the text field.
The library has UiInputField.value which is the property that should be used to read the value: https://playcanvas.com/editor/code/1005906?tabs=109692056
The HTML input field should not be used to read the value of the text field.
Oh, you are talking about while you are typing, the value is still the old value. In which case, this library doesnât support that. It only gets the value of input box when the user is done.
No i was talking exactly about the âvalueâ property and building an example on tutorial project i saw that it works as expected, so I have to understand why in my project it doesnt set the value on Unfocus, to be continued
thank you
I noticed that the input field does not resize when resizing the browser to a larger size. Any way to fix this?
A post was split to a new topic: How do I add text for instructions in FPS tutorial?
How can i access this value propery from the script?
This does not workâŚ
password = this.app.root.findByName(âPasswordInputFieldâ);
console.log(password.value);
findByName returns an entity. So from there, you need to access the script component and then the script type and finally the property for the text
Iâm not at a computer so untested:
const passwordEntity = this.app.root.findByName(âPasswordInputFieldâ);
passwordEntity.script.uiInputField.value
Thank you! It works.
Is there a way to make a tab-sequence in a Layout Group?
After i enter a username and enter/tab - the cursor does not proceed to the next InputField passwort and then next to buttonLogin.
No, you will have to code that yourself