Answer the question
In order to leave comments, you need to log in
How to assign coordinates to an object?
It would seem that the simplest task is to assign coordinates to an object.
Debug.Log("1> (" + ArrayCell[i].transform.position.x + ", " + ArrayCell[i].transform.position.y + ")");
Vector3 TV = RoundVector3(ArrayCell[i].transform.position, 2);
Debug.Log("2> (" +TV.x + ", " + TV.y +")");
ArrayCell[i].transform.position = TV;
Debug.Log("3> (" + ArrayCell[i].transform.position.x + ", " + ArrayCell[i].transform.position.y + ")");
1>(2, 5.120002)
2>(2, 5.12)
3>(2, 5.120002)
Answer the question
In order to leave comments, you need to log in
There is no coordinate assignment in your code. There is only reading
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question