In my project I have a very simple assignment.
Vector3 v1 = new Vector3(0,0,0);
Vector3 v2 = v1;
v2.x = 10;
Debug.Log(v1);
The above code prints "0,0,0". If this was Java it would print "10,0,0" because v2 would reference v1. How do I get this in C#?
I want v1 and v2 to point to the same object. This is also part of a unity project but I don't think that's relevant here?