Hi , I am just starting, using one of tutorials, and I can’t use Mathf.Round - (both “Mathf” and “Round” do not change color indicating acknowledge of function)
When I add “using System;” I can use Math. not Mathf. but Round do not work anyway.
Try running your Visual Studio installer, clicking the “Modify” button on your installation, and then scroll down to see if the Unity Engine workload is checked. If not, check it and update your installation.
It doesn’t make sense that Math.Round doesn’t work when Math is in your library. I don’t know why it isn’t reading Mathf. Maybe reinstall Visual Studio. I had to do it once when I upgraded.
System.Math takes 2 parameters so you can specify the number of decimal points. UnityEngine.Mathf only takes 1 parameter, and rounds to the nearest whole number. You’ve probably solved this by now, but it sounds like you were trying to use the Unity version like the System version.
I think you need to understand that the Math library of functions found in System IS NOT the same as the one in UnityEngine. The Math library found in System has no Mathf static class - in other words there is no Mathf.Round, only Math.Round