internal Vector2 GetGraphPositionFromContext(SearchWindowContext context) { var windowRoot = _editorWindow.GetRootVisualContainer(); var windowMousePosition = windowRoot.ChangeCoordinatesTo(windowRoot.parent, context.screenMousePosition - _editorWindow.position.position); var graphMousePosition = _graphView.contentViewContainer.WorldToLocal(windowMousePosition); return(graphMousePosition); }
internal Vector2 GetGraphPositionFromContext(SearchWindowContext context) { #if UNITY_2019_3_OR_NEWER var windowRoot = _editorWindow.rootVisualElement; #else var windowRoot = _editorWindow.GetRootVisualContainer(); #endif var windowMousePosition = windowRoot.ChangeCoordinatesTo(windowRoot.parent, context.screenMousePosition - _editorWindow.position.position); var graphMousePosition = _graphView.contentViewContainer.WorldToLocal(windowMousePosition); return(graphMousePosition); }