- Home /
Question by
coldstar · Dec 18, 2016 at 02:50 PM ·
editorwindowmouseclickeditorguilayoutobjectfieldevent-listener
How to know the event that mouse click on a EditorGUILayout.ObjectField(...)?
I draw a EditorGUILayout.ObjectField(...) in OnGUI() of my EditorWindow. I want to know the event that mouse click on it and than to do something like make Scene Window to focus that object. Can someone please tell me how to register or listen this kind of event?
Comment
Answer by Adam-Mechtley · Jan 12, 2017 at 08:13 AM
Have you tried Event.current.GetTypeForControl()?
Your answer
![](https://koobas.hobune.stream/wayback/20220612102955im_/https://answers.unity.com/themes/thub/images/avi.jpg)