Making 2D Compass From Quaternion

I have a 3D rotation (Quaternion) of a device from Input.compass.rawVector and want a 2D rotation (Vector2) of the device in X and Z axis. The given Quaternion is not always looking at the horizon - the Y value varies. How do you take such a Quaternion value and calculate a 2D rotation in the XZ face?

I did quite get your question but try this. (I’m answering from mobile device. Forgive me if it is hard to read)

Vector2 compass_vector;

compass_vector = new Vector2 (Quaternion.Euler(Input.compass.rawVector).x, Quaternion.Euler(Input.compass.rawVector).z);

Let me know.