Better Vector3 Console Output

When you Debug.Log(myVector3); Unity will output it’s contents to the console with only a single decimal point. This might be fine 90% of the time however sometimes you want to see smaller vectors. The simplest method to get more decimals is making use of the Vector3 ToString override which allows you to specify a string formatting value so to get 5 decimal points, you would write Debug.Log(myVector3.toString(“F5”));

Bookmark the permalink.

Leave a Reply