title: Unity3d c# - Vector3 as default parameter
body: <p>How can we add <code>Vector3</code> as default parameter for a method? for example:</p>
  
  <pre><code>Void SpawnCube(Vector3 p = new Vector3(0,0,0)){...}
  </code></pre>
  
  <p>I just tried the line about I got an error:</p>
  
  <blockquote>
    <p>Expression being assigned to optional parameter `p' must be a constant or default value</p>
  </blockquote>
  
  <p>I want to customise a function to spawn some <code>game objects</code> that if I did not provide the <code>transform.position</code>, it will go to <code>(0,0,0)</code>.</p>