title: trouble instantiating an object and changing its layer
body: <p>I tried it with the following steps;</p>
  
  <p>1.- Take the GameObject I want to instantiate</p>
  
  <pre><code>public GameObject Arrow
  </code></pre>
  
  <p>2.- Take another GameObject as a reference to spawn it</p>
  
  <pre><code>public GameObject A
  </code></pre>
  
  <p>3.- Then, at some point in my code, instantiate it with that spawn GameObject coordinates and rotation</p>
  
  <pre><code>Instantiate (Arrow,  A.transform.position, A.transform.rotation);
  </code></pre>
  
  <p>4.- And finally changing the layer of the instantiated Gameobject to match the layer of the spawn Gameobject</p>
  
  <pre><code>Arrow.layer = A.layer;
  </code></pre>
  
  <p>I have the same script atacched to several gameobjects, the spawn point, which is public, it's interchangeable and I can choose between several of them that I have prepared all with diferent positions and layers.</p>
  
  <p>The outcome of this is that all the instantiated objects spawn in the same point and have the wrong layer. they took 1 layer above instead, for example: one that should have got layer B has now layer A,
  another that should have got layer C has now layer B.</p>
  
  <p>Did I do something wrong, does what I've done do what I think it does? </p>