I wonder what gets returned using the get property for C# on an object, is it a reference or it is a copy of what that property is assigned to?
From my understanding it's actually returning a copy instead of a reference. For the code below, I need the 4th line to make Position work (Position is a property of a base class)
Vector2 position = Position;
position.x = Mathf.Clamp(Position.x, 0, mScreenSize.x);
position.y = Mathf.Clamp(Position.y, 0, mScreenSize.y);
Position = position; //This line is required to clamp the position into Position