How to set mobile device position zero

Hi guys, Im just starting my adventure with c# and unity so please forgive me my lack of knowledge and messy code. I was digging through the internet for 2 days , but nothing i found worked for me. What I need is how to get device position on void start, so every time i run game, game detects phone in 0 position.`

public class Controller : MonoBehaviour {

Rigidbody rb;  
float dirX;
public float moveSpeed = 10f;

// Start
void Start () {
    rb = GetComponent<Rigidbody> ();

// Update 
void Update () {
	dirX = Input.acceleration.x * moveSpeed;
	//limit y-axis movement for future ramps etc
    transform.position = new Vector3(transform.position.x, Mathf.Clamp (transform.position.y,-99f,20f), transform.position.z);
// FixedUpdate
void FixedUpdate()
	rb.velocity = new Vector3 (0, -4f, dirX);
    transform.position = new Vector3(transform.position.x - 0.2f, transform.position.y, transform.position.z);       


I have tried This one how to detect device start position for player acceleration (iPhone) But it didn’t work for me neither(im working on android).

I will appreciate any advice and help.

Hi, I see you’ve been practising a lot with c#!!
I’m going to ask you if you tried adding a button in the canvas for reseting and detecting when you press it for setting the rotation to 0.
It’s only a suggestion, could you tell me if it works?
Don´t forget to use the UI library.