Hello
If I write
transform.position = Vector3(0, 0, 0);
I get the error message
Assets/Scripts/Leopard.cs(85,27): error CS1612: Cannot modify a value type return value of `UnityEngine.Transform.position’. Consider storing the value in a temporary variable
How can I move the object to (0,0,0) ?
transform.position = Vector3(0,0,0);
Should work just fine.
But you could try this instead :
transform.position = Vector3.zero;
You need to use “new Vector3” in C#.
–Eric
thanks Eric you are right
Of course in C# you must use new
However the manual should be fixed
it uses transform.position = Vector3(0,0,0);
also for c#