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
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