title: Unity - Prefab Spawn Point
body: <p>I am creating a player <em>Prefab</em> that should spawn if the player connects to the server.</p>
  
  <p>I have been testing the <em>Prefabs</em>, and it is spawning but not in the position i want.</p>
  
  <p>Can someone help me to fix my problem? </p>
  
  <p>Here is my position-point function:</p>
  
  <pre><code>public class PointJSON
  {
      public float[] position;
      public PointJSON(SpawnPoint spawnPoint)
      {
          //* Position 
          position = new float[]
          {
              spawnPoint.transform.position.x,
              spawnPoint.transform.position.y,
           };
      }
  }
  </code></pre>
  
  <p>And here is my instantiated <code>GameObject</code>:</p>
  
  <pre><code>userJSON currentUserJSON = userJSON.CreateFromJSON(data);
  Vector2 position = new Vector2(currentUserJSON.position[0],currentUserJSON.position[1]);
  GameObject p = Instantiate(player, position, Quaternion.identity) as GameObject;
  </code></pre>