You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project in Unity, and I want to capture hover and drag events while another button is being pressed. I can see hover being triggered on each button.... but that stops while I'm pressing and holding down on another button, and no more hover events come in while I drag over them.
This is pretty simple with Unity UI, I have it working in a different app.
My goal is to:
Click on a button.
Drag across other buttons while holding the initial press.
Capture hover events for each button I drag over.
Perform an action based on the final button I release on.
Here’s what I’ve tried so far:
`using Nova;
using UnityEngine;
public class SimpleButtonDragHandler : MonoBehaviour
{
private UIBlock initialButton;
private UIBlock lastHoveredButton;
private bool isDragging = false;
Scene Setup:
Each button has both UIBlock2D and Interactable components.
The script is attached to each button, with unique identifiers set in the thisHr field for debugging.
Issue:
Only the OnPress event logs appear, and the OnDrag and OnHover events are not triggering during the drag.
Request:
Can anyone provide insights or suggestions on how to correctly capture and handle hover and drag events in Nova UI during a button press? Any help or examples would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm working on a project in Unity, and I want to capture hover and drag events while another button is being pressed. I can see hover being triggered on each button.... but that stops while I'm pressing and holding down on another button, and no more hover events come in while I drag over them.
This is pretty simple with Unity UI, I have it working in a different app.
My goal is to:
Click on a button.
Drag across other buttons while holding the initial press.
Capture hover events for each button I drag over.
Perform an action based on the final button I release on.
Here’s what I’ve tried so far:
`using Nova;
using UnityEngine;
public class SimpleButtonDragHandler : MonoBehaviour
{
private UIBlock initialButton;
private UIBlock lastHoveredButton;
private bool isDragging = false;
}`
Scene Setup:
Each button has both UIBlock2D and Interactable components.
The script is attached to each button, with unique identifiers set in the thisHr field for debugging.
Issue:
Only the OnPress event logs appear, and the OnDrag and OnHover events are not triggering during the drag.
Request:
Can anyone provide insights or suggestions on how to correctly capture and handle hover and drag events in Nova UI during a button press? Any help or examples would be greatly appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions