Fix editor viewport input when using ScreenSpace canvas in a prefab
This commit is contained in:
@@ -974,7 +974,8 @@ namespace FlaxEditor.Viewport
|
||||
// Get input buttons and keys (skip if viewport has no focus or mouse is over a child control)
|
||||
bool useMouse = Mathf.IsInRange(_viewMousePos.X, 0, Width) && Mathf.IsInRange(_viewMousePos.Y, 0, Height);
|
||||
_prevInput = _input;
|
||||
if (ContainsFocus && GetChildAt(_viewMousePos, c => c.Visible) == null)
|
||||
var hit = GetChildAt(_viewMousePos, c => c.Visible && !(c is CanvasRootControl));
|
||||
if (ContainsFocus && hit == null)
|
||||
_input.Gather(win.Window, useMouse);
|
||||
else
|
||||
_input.Clear();
|
||||
|
||||
Reference in New Issue
Block a user