- Home /
unity Vector2 problem
Hi, I have a problem with Vector2 class
The problem is that I need to change the uv property of my mesh to specific values, but Unity's Vector2 class rounds these values up. Is there any way to stop Unity doing this?
Code is as follows:
var u : float = 5.0/64.0;
Debug.Log(u); //Outputs 0.078125
Debug.Log(Vector2(u,0)); //Outputs (0.1,0)
Comment
Best Answer
Answer by Eric5h5 · Apr 12, 2010 at 10:03 PM
It's only the output from Debug.Log that is rounded, and only if you print the entire Vector2. If you want to see the actual values, print each component individually.