WFW
1
I have used script below
void OnGUI() {
GUILayout.Label(Input.compass.rawVector.ToString());
}
It returns zero vector on screen.I don’t understand why it doenst work.Compass works well in tests of the phone.
Unity Version: 4.5.5f1
Phone:Samsung Galaxy S4
Andoroid Version:4.4.2
WFW
2
My problem is solved thank you.
I added the lines below to start function.
Input.location.Start();
Input.compass.enabled=true;
from Unity - Scripting API: Compass.enabled