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
- EditorGUILayout.PropertyField foldout icon inside Vertical Layout Group has an incorrect indent when used with OnInspectorGUI()
- [Android] [iOS] "NullReferenceException: Object reference not set to an instance of an object" throws when entering the Play Mode/opening the application
- The Player freezes on load when building Web platform
- Animator "Conditions" tab breaks when the only Parameter is deleted and another one is created
- "Shader error in 'Universal Render Pipeline/Lit': maximum ps_5_0 sampler register index (16) exceeded" error thrown after a build is completed when the "LOD Cross Fade" parameter is enabled
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