Search Issue Tracker
Fixed in 0.3.0-preview
Votes
0
Found in [Package]
0.0.9-preview
Issue ID
1093833
Regression
No
[iOS, Android][Sensors] Cannot set samplingFrequency, trying to set it breaks sensor on iOS
Migrated bug from GitHub: https://github.com/Unity-Technologies/InputSystem/issues/280
Expected result:
InputSystem.EnableDevice(Accelerometer.current);
// Accelerometer.current.acceleration works fine
Accelerometer.current.samplingFrequency = 30.0f;
// Accelerometer.current.samplingFrequency returns 30.0f
// Accelerometer.current.acceleration works fine and samples in frequency that is set
Actual result:
on iOS:
InputSystem.EnableDevice(Accelerometer.current);
// Accelerometer.current.acceleration works fine
Accelerometer.current.samplingFrequency = 30.0f;
// Accelerometer.current.samplingFrequency returns 0
// Accelerometer.current.acceleration stops updating, disabling/enabling doesn't help
The issue here is that samplingFrequency returns 0 instead of actual frequency and that it breaks the sensor
on Android:
InputSystem.EnableDevice(Accelerometer.current);
// Accelerometer.current.acceleration works fine
Accelerometer.current.samplingFrequency = 30.0f;
// Accelerometer.current.samplingFrequency returns 0
// Accelerometer.current.acceleration works fine (can't tell if sampling frequency actually changed though)
The issue here is that samplingFrequency returns 0 instead of actual frequency and possibly doesn't set frequency to the wanted value?
The same happens with all the other sensors
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 GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Add comment