Vector3.ToString()

guiPredictedPosition.text = predictedPosition.ToString();

I’m getting an error message in Unity from this line of code.

No appropriate version of ‘UnityEngine.Vector3.ToString’ for the argument list ‘(String)’ was found.

predictedPosition is a Vector3. Vector3.ToString() I thought would create a string.

I can’t find anything in docs or the forums regarding an argument list for Vector3.ToString. I can see from the car.js script in racedemo "f1’. But that doesn’t help.

Any advice on what I could be doing wrong trying to get a Vector3 into a GUIText?

I have the GUIText working fine with float variables.

Thanks.

Mitch

Can you post the full script? Vector3.ToString() eexists and should just work for you.

d.

I got it to work - I don’t think I exposed the variable outside function Start().

Thanks for responding. Unity 3D is incredible. I know I have been making beginner mistakes (haven’t programmed in 20 years), but the learning curve is so sharp. It’s amazing how much one can do so fast with Unity.