If UI is culling children, dont return children outside of client area for raycast.
This commit is contained in:
@@ -901,6 +901,15 @@ namespace FlaxEngine.GUI
|
||||
|
||||
internal bool RayCastChildren(ref Float2 location, out Control hit)
|
||||
{
|
||||
if (_clipChildren)
|
||||
{
|
||||
GetDesireClientArea(out var clientArea);
|
||||
if (!clientArea.Contains(ref location))
|
||||
{
|
||||
hit = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int i = _children.Count - 1; i >= 0 && _children.Count > 0; i--)
|
||||
{
|
||||
var child = _children[i];
|
||||
|
||||
Reference in New Issue
Block a user