public static class Vector3Extensio {
public static Vector2 Round(this Vector3 v){
int x = Mathf.RoundToInt (v.x);
int y = Mathf.RoundToInt (v.y);
return new Vector2 (x, y);
}
}
Vector2 pos = child.position.Round ();这里的round为什么可以调用上面的round方法