Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to change a single tilemap by coding?

Discussion in '2D' started by QinBugong, Oct 26, 2022.

  1. QinBugong

    QinBugong

    Joined:
    Aug 7, 2022
    Posts:
    2
    Hello everyone

    These days I'm working on a 2D project and I found no way to change a single tilemap grid by code, so I'm wondering if someone knew how to do it.

    Like you see in the picture, for example, if I want to change the ground "a" to grass on the right side when something happened, how can I code to reach this?

    The problem is that I don't know how to select the grid specified, when I click, it will be selected the whole tilemap object in the hierarchy.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,954
    QinBugong likes this.
  3. QinBugong

    QinBugong

    Joined:
    Aug 7, 2022
    Posts:
    2