title: How to get point position in the grid by using dictionary?
body: <p>can someone help me?
  I made a grid for my board. When I'm trying to get Point position of the square in the board, console returns only (0,0).</p>
  
  <p>This is my point code:</p>
  
  <pre><code>public struct Point 
  {
      public int X {get; set;}
      public int Y {get; set;}
  
      public Point(int x, int y){
          this.X = x;
          this.Y = y;
  
      }
  
  
  }   
  </code></pre>
  
  <p>This is script where every square get a point in the grid when instantiated:</p>
  
  <pre><code>public Point GridPosition { get; set; }
  
  
  public void Setup(Point gridPos, Vector3 worldPos)
  {
      this.GridPosition = gridPos;
      transform.position = worldPos;
  }
  
  private void OnMouseDown(){
  
      Debug.Log (GridPosition.X + ", "+ GridPosition.Y );
  
  }    
  </code></pre>
  
  <p>And this is my main script with Dictionary part:</p>
  
  <pre><code>public static Dictionary&lt;Point,Grid&gt; Tiles { get; set; }
  
  void Start()
  {
      CreateLevel ();
  }
  
  void CreateLevel()
  {
  
      Tiles = new Dictionary&lt;Point,Grid&gt; ();
  }
  
  private void PlaceTilesColliders(Vector3 tileStart, float tileOffset){
  
      for (int y = 0; y &lt; 8; y++) 
      {
          for (int x = 0; x &lt; 8; x++) 
          {
  
              TileCollider.GetComponent&lt;Grid&gt; ().Setup (new Point (x, y), new Vector3 (tileStart.x + (tileOffset * x), tileStart.y - (tileOffset * y), 0));
  
              Tiles.Add (new Point (x, y), Instantiate(TileCollider).GetComponent&lt;Grid&gt;());
  
  
          }
      }  
  }     
  </code></pre>
  
  <p>So, console return every time (0,0), don't matter which square was clicked.
  Can someone explain me how to get true point position of the square in the grid?</p>