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

Changing InputField Content Type #82

Closed irfanshahunity closed 8 months ago

irfanshahunity commented 3 years ago

Hello: I am making a login Module, i want to add Show Password Button , that will change the Inputfield content Type . e.g : from Standard to Password and From Password to Standard . i did it by adding a function that is like: public void ChangeContentType(bool show) { if (show) { _inputObject.contentType = InputField.ContentType.Standard; _config.ContentType = _inputObject.contentType.ToString(); SetFocus(true);
} else {
_inputObject.contentType = InputField.ContentType.Password; _config.ContentType = _inputObject.contentType.ToString(); SetFocus(true); } JsonObject data = new JsonObject(); data["content_type"] = _config.ContentType;
CreateNativeEdit();
}
it works well but after applying this to inputfield is fixed but after that i am unable to hide the input field. please help me on this issue thanks in Advance .

tried Different Things Like : _inputObject.shouldHideMobileInput = true;
other : this.SetFocus (false); this.SetVisible (false); even i setActive the main gameObject but didn,t work please help Screenshot_2021-07-14-19-29-05-12_47ed3fca1706bdaf4cb75e9bba4a7d85 Screenshot_2021-07-14-19-29-17-46_47ed3fca1706bdaf4cb75e9bba4a7d85 Screenshot_2021-07-14-19-29-17-46_47ed3fca1706bdaf4cb75e9bba4a7d85