I am having issues with visual studio it seems but this one I cant Seem to fix. The EditorSnapSettings I don’t think is being called but I could be wrong
Hi,
Welcome to our community!
Thank you for posting your screenshots. What did you expect to see?
I can’t screen shot Udemy but it showed in video that the numbers were single digits not increments of tens.
We use the CoordinateLabeler component for purposes of debugging only. For this reason, it does not matter if you have multiples of 10. If the numbers are 0, 10, 20, 30, 40 and so on, that’s fine, too.
If you prefer to see 0, 1, 2, 3, 4 and so on, the simplest solution is to divide the calculated numbers by 10.
coordinates.x = Mathf.RoundToInt(transform.parent.position.x / UnityEditor.EditorSnapSettings.move.x)/10f;
coordinates.y = Mathf.RoundToInt(transform.parent.position.z / UnityEditor.EditorSnapSettings.move.z)/10f;
Alternatively, check the position of each cube/waypoint. If it is a multiple of 10, the “EditorSnapSettings” values must be a multiple of 10 to. Look for “Increment Snap” in the manual and check the values in your Unity Editor. If the “Move” values are not 10, set them to 10.
See also:
- Forum User Guides : How to apply code formatting within your post
- Forum User Guides : How to mark a topic as solved
If you look at the screen shots I took I did try to divide it just didn’t work. I have moved forward now and now trying to figure out how to get my animation of the asset I am using to work.