linuxgurugamer Posted May 3, 2016 Share Posted May 3, 2016 I think the subject says it all. The problem is that when you are typing in the search box, and, for example, type the letter "c", that letter is passed to EditorExtensionsRedux which then processes it. How can I detect when someone is typing in the search box, so that I can ignore those characters? thanks in advance LGG Link to comment Share on other sites More sharing options...
sarbian Posted May 3, 2016 Share Posted May 3, 2016 Something along the line of GameObject obj = EventSystem.current.currentSelectedGameObject; bool inputFieldIsFocused = (obj != null && obj.GetComponent<InputField>() != null && obj.GetComponent<InputField>().isFocused); Link to comment Share on other sites More sharing options...
linuxgurugamer Posted May 3, 2016 Author Share Posted May 3, 2016 22 minutes ago, sarbian said: Something along the line of GameObject obj = EventSystem.current.currentSelectedGameObject; bool inputFieldIsFocused = (obj != null && obj.GetComponent<InputField>() != null && obj.GetComponent<InputField>().isFocused); From what I can tell, EventSystem was introduced in 4.6; isn't KSP using 4.5? Link to comment Share on other sites More sharing options...
sarbian Posted May 3, 2016 Share Posted May 3, 2016 Just now, linuxgurugamer said: From what I can tell, EventSystem was introduced in 4.6; isn't KSP using 4.5? i am at loss for words. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted May 3, 2016 Author Share Posted May 3, 2016 (edited) 5 minutes ago, sarbian said: i am at loss for words. well, I guess I did some bad research :-) So why am I getting the EventSystem does not existin the current context? I have the following using statements: using UnityEngine; using UnityEngine.UI; 6 minutes ago, linuxgurugamer said: well, I guess I did some bad research :-) So why am I getting the EventSystem does not existin the current context? I have the following using statements: using UnityEngine; using UnityEngine.UI; Never mind, found it: using UnityEngine.EventSystems; Oh, and thank you for the help Edited May 3, 2016 by linuxgurugamer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now