title: Change string value with buttons C# Unity2D
body: <p>i'm trying to build a level editor when i click the button that calls WoodenWallTile() the string isn't changed to &quot;wooden wall tile&quot; so only the floor tile places on the tilemap, i'm wondering how i can change the selectedTile string value with a button?</p>
  <p>above update()</p>
  <pre><code>public TileBase woodenFloorTile;
  public TileBase woodenWallTile;
  private string selectedTile = &quot;wooden floor tile&quot;;
  </code></pre>
  <p>in update()</p>
  <pre><code>            foreach (Vector2Int cell in area.allPositionsWithin)
          {
              Vector3Int pos = (Vector3Int)cell;
              if (selectedTile == &quot;wooden wall tile&quot;)
              {
                  tilemap.SetTile(pos, woodenWallTile);
              }
              if (selectedTile == &quot;wooden floor tile&quot;)
              {
                  tilemap.SetTile(pos, woodenFloorTile);
              } 
             
              
              interactiveTilemap.ClearAllTiles();
          }
  </code></pre>
  <p>wall tile button calls</p>
  <pre><code>    public void WoodenWallTile() {
      selectedTile = &quot;wooden wall tile&quot;;
      Debug.Log(&quot;IT CHANGED TO WALL&quot;);
  }
  </code></pre>