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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment