Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2019.4.0f1
Issue ID
1357272
Regression
No
[UWP] Input isn't registered when pressing the button in build
Reproduction steps:
1. Create a new UWP project
2. Open the Project Settings tab and go to Player > Product Name, then change the Product Name to uwp_unity
3. Open Build Settings tab in File > Build Settings
4. Change Platform to Universal Windows Platform, and Build Type to XAML Project
5. Build into unity_uwp_test folder from the Google Drive link
6. Open uwp_unity.sln and set to Release x64 then build to your local machine
7. Click the button on the right in the app
8. Hold the W key button
Expected result: Camera is moving
Actual result: Camera isn't moving
Reproducible with: 2019.4.31f1
Could not test with: 2020.3.20f1, 2021.1.25f1, 2021.2.0b16, 2022.1.0a12 (Build Crashes)
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
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
- Icon section shows incomplete message and unusable check box in Build Profiles and Player Settings window instead of “Not applicable for this platform” for Dedicated Server Platform
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
Resolution Note (2022.1.X):
When a XAML control is "focused", Unity will stop passing key presses into the Input systems and APIs like Input.GetKey() won't receive input until XAML releases focus.
The general idea is: if the user is interacting with XAML, e.g. typing text into an input field, then Unity shouldn't process input. If this isn't what you want, you'll need to manage the focus state of your XAML controls.
In the case of this project, you can make the buttons "unfocusable" by setting IsTabStop to false.
For example:
<Button x:Name="UndoButton" x:Uid="Undo" Width="50" Height="50" IsTabStop="False">
This will allow the buttons to be "clickable" but they cannot be focused by the keyboard and won't take input away from Unity.