Search Issue Tracker
By Design
Votes
0
Found in
2021.1
2021.2
2021.2.0a21
2022.1
Issue ID
1347117
Regression
Yes
[Device Simulator] SystemInfo.deviceType returns 'Desktop' when the simulator is active
How to reproduce:
1. Open the attached '1347117.zip' project
2. Open the SampleScene
3. Open Window > General > Device Simulator
4. Enter the Play mode
5. Observe the Console
Expected result: 'Handheld' gets logged in the Console
Actual result: 'Desktop' gets logged in the Console
Reproducible with: 2021.1.14f1, 2021.2.0b3, 2022.1.0a1
Not reproducible with: Device Simulator 3.0.1-preview (2019.4.29f1, 2020.3.14f1)
Cannot test with: 2018.4.36f1 (the package is not supported)
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
- SerializedPropertyChangeEvent is invoked when initially binding PropertyFields in custom Editor
- UI Panel is not visible when HDR and STP filter are enabled
- Crash on GfxDeviceD3D11Base::DrawBuffersIndirect when opening a specific project
- OnTriggerExit2D is called in Play mode when undoing component adding
- Builds fail with "Execution failed for task ':launcher:checkReleaseDuplicateClasses'" error when the newer version of the In-App Purchasing package is installed on a specific project
Resolution Note (2022.1.X):
Use UnityEngine.Device.SystemInfo instead of UnityEngine.SystemInfo to get simulated values. Here's a manual page with more info https://docs.unity3d.com/2021.2/Documentation/Manual/device-simulator-simulated-classes.html