Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.3.0
1.5.0
Issue ID
ISXB-100
Regression
No
[Input System] UI Toolkit elements are not focused when entering Play mode with New Input System
Reproduction steps:
1. Open the attached user's Unity project "NewFocus.zip"
2. Go to Assets > Scenes folder and open "SampleScene.unity" Scene
3. Enter the Play mode and press the "Enter" key
4. Observe the Game view
Expected result: The cube appears in the Game view after pressing the "Enter" key
Actual result: The cube does not appear in the Game view after pressing the "Enter" key
Reproducible with: 1.2.0, 1.3.0 (2021.2.19f1, 2021.3.1f1, 2022.1.0f1, 2022.2.0a10)
Could not test with: 2019.4.38f1, 2020.3.33f1 (Project breaks after downgrade)
Notes:
- The issue is not reproducible with Old Input System
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
Resolution Note:
The firstButton.Focus() is currently called in the OnEnable() method. That does not work because the focused element needs to be provided in the Start() method. Otherwise the EventManager initialization is done, without the event manager knowing the first selected element. So the best practice at the moment is to use the .Focus() method in Start(). I am referring to the following documentation: https://docs.unity3d.com/Manual/UIE-faq-event-and-input-system.html