current player.s position debug ?!

Updated on December 17, 2017 in [A] GUI
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on December 17, 2017

hello , I wanna debug the  player’s current position  debug-ing  in real time in console window   this is the code :

-first I sign these :

  public Rigidbody rb;
 public Transform tf;

lined them in the inspector 

in void update method I put this code :

Debug.Log(transform.position .ToString());

i did as well this :

 

Debug.Log(transform.position.ToString());
Debug.Log(tf.position);
Debug.Log(tf.position.ToString());

 

 

but nothing happens !

 

  • Liked by
Reply
0 on December 17, 2017

all you have to do is 

Debug.Log(transform.position)

but the script has to be a component of whatever you want the position of

  • Liked by
Reply
Cancel