title: Unity : Cannot modify a value type return value of `UnityEngine.Transform.position'
body: <p>I am currently trying to lock my camera to a map I made in Unity3D using this code that was converted from JavaScript:</p>
  
  <pre><code>transform.position.z = Mathf.Clamp(transform.position.z, zmin, zmax);
  transform.position.x = Mathf.Clamp(transform.position.x, xmin, xmax);
  </code></pre>
  
  <p>But Unity keeps on returning the following error while compiling: <code>error CS1612: Cannot modify a value type return value of 'UnityEngine.Transform.position'. Consider storing the value in a temporary variable.</code></p>