Unity-Technologies / Unity-Technologies/uGUI

When clicking on a mobile platform, some gameobject will trigger OnEnter event without OnExit event

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.6k
Forks
323
PR merge metrics
No merged PRs in 30d

Description

The TouchInputModule executes OnEnter by calling the HandlePointerExitAndEnter function, which calls OnEnter for newEnterTarget and all its ancestor nodes, and add all gameobject that have executed OnEnter to the hovered list.
However, when pointer release it executes OnExit on pointerEnter gameobject only.

Image

I think the correct approach is invoke HandlePointerExitAndEnter(pointerEvent, null) when pointer release. Is this a bug or an expectation?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating TouchInputModule and its release path, then inspect how HandlePointerExitAndEnter updates the hovered list and invokes OnEnter and OnExit. Verify whether every object receiving OnEnter gets a corresponding OnExit when the pointer is released, and determine whether the release behavior matches the intended contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.