Open flogli opened 6 months ago
Hi, I've work with this asset and find out that the method GetTarget() - TransformGizmo.cs going through the UI elements
Here my solution if you need it: I'm sure there is a better option to do that but it's working as expected now
Hope you find it useful
void GetTarget() { if (nearAxis == Axis.None && Input.GetMouseButtonDown(0)) { bool isAdding = Input.GetKey(AddSelection); bool isRemoving = Input.GetKey(RemoveSelection); RaycastHit hitInfo; if (Physics.Raycast(myCamera.ScreenPointToRay(Input.mousePosition), out hitInfo, Mathf.Infinity, selectionMask)) { if (!EventSystem.current.IsPointerOverGameObject()) { Transform target = hitInfo.transform; if (isAdding) { AddTarget(target); } else if (isRemoving) { RemoveTarget(target); } else if (!isAdding && !isRemoving) { ClearAndAddTarget(target); } } else { ClearTargets(); } } else { if (!isAdding && !isRemoving) { ClearTargets(); } } } }
Hi, I've work with this asset and find out that the method GetTarget() - TransformGizmo.cs going through the UI elements
Here my solution if you need it: I'm sure there is a better option to do that but it's working as expected now
Hope you find it useful