- Home /
Question by
octavia · Mar 13, 2015 at 10:54 PM ·
inputfield
How do you stop InputField from activating when the user left clicks?
I don't want this behavior that when the user clicks anywhere outside of the InputField it triggers End Edit. I want clicking outside of the InputField to simply deselect the InputField and not send End Edit. Thanks for your help.
Comment
Answer by el-pepi · Mar 14, 2015 at 03:47 PM
I'm guessing you don't want it to call end edit so it doesn't call your fuction, right?
You can do something like this:
public void YourFunction(){
if(Input.GetMouseButtonDown(0)){
return;
}
//your code here
}
Your answer
Follow this Question
Related Questions
uGUI inputfield text truncates? 2 Answers
Saving only Integers in an inputfield via code 1 Answer
Problem with UI input field in android 1 Answer
How to disable TouchScreenKeyboard for InputField? 0 Answers
Get Text from an Input Field on one scene and use it as a text on another scene Unity c# 0 Answers