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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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