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
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
Add comment