unity中,Vector2、Vector3之间的任意赋值都是传值
Vector2 v1; var v2=new Vector2(2,2); v1=v2; v2.x=3; Debug.Log(v1);//output: (2.0, 2.0) Debug.Log(v2);//output: (3.0, 2.0)
unity中,Vector2、Vector3之间的任意赋值都是传值
Vector2 v1; var v2=new Vector2(2,2); v1=v2; v2.x=3; Debug.Log(v1);//output: (2.0, 2.0) Debug.Log(v2);//output: (3.0, 2.0)
转载于:https://www.cnblogs.com/kingBook/p/8439201.html