public float shakeThreshold= 1;
public void Update()
{
if(Input.acceleration.magnitude >= shakeThreshold)
{
Invoke("Throw", 0.7f);
}
}
I have a basic code that when I shake my phone invoke the throw method.
It works perfectly fine in unity remote 5 but when I build the game and play on my phone it doesn't work. I checked Player Settings and there are nothing about "Accelerometer" in the settings.
what is the issue here: the code, unity remote, android sdk or my phone?