- Home /
Question by
aalmada · Jun 29, 2013 at 04:08 PM ·
editorwindowscrollviewdraganddropfoldout
How to get the LabelField that is under the mouse cursor?
I'm trying to implement drag&drop in a custom EditorWindow similar to the Hierarchy. I have several EditorGUILayout.LabelField inside several EditorGUILayout.Foldout, all inside EditorGUILayout.BeginScrollView. How can I know if I have a LabelField under the mouse cursor when the user starts dragging? I tried the GUI.tooltip trick suggested in the documentation but the tooltip is automatically displayed, making it unusable.
Comment
Answer by aalmada · Jun 30, 2013 at 04:06 PM
Just found out about GUILayoutUtility.GetLastRect() that solves my problem...