- Home /
First UI click in a scene doesnt register
I'm working on a small UI-only app and the problem I'm currently trying to fix is that most of the time, but not always, the first click on the UI after any scene transition doesn't register. The issue seems to be more prevalent when deployed to a phone than in the editor, but it happens in both. Its almost like the UI doesnt have focus until clicked, but I havent had any luck finding a workaround. Any thoughts on how I might fix this?
Thanks!
Have you tried assigning an object to the "First Selected Gameobject" field of the Event System in the hierarchy?
If you'd rather do it in code, you can explicitly set the current selection using SetSelectedGameObject()
https://docs.unity3d.com/ScriptReference/EventSystems.EventSystem.SetSelectedGameObject.html
Answer by Gmoff01 · Oct 16, 2016 at 11:02 PM
The issue for this seems to be that the crossfade texture I was using between scenes was staying on top of the UI for slightly longer than it looked like, so clicking was happening before it fully faded out and was moved to the bottom. I set the image in question to not block ray traces and all is well now.
Your answer
![](https://koobas.hobune.stream/wayback/20220612094724im_/https://answers.unity.com/themes/thub/images/avi.jpg)