Search Unity

How to find which tilebase is currently selected in TIle Palette window

Discussion in '2D' started by Ocean257, Sep 12, 2019.

  1. Ocean257

    Ocean257

    Joined:
    Jan 9, 2016
    Posts:
    10
    1) I need a callback when every any TileBase is changed inside tile palette window
    2) I want to remove drag functionality in scene view when I am editing a tilemap
     
  2. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    305
    - How to find which tilebase is currently selected in TIle Palette window
    The current brush stores the Tiles picked by you. With 2019.2, you can use
    GridPaintingState.gridBrush.
    to get your brush and view the picked Tiles depending on your brush (eg. GridBrush.cells[0].tile for the DefaultBrush).

    - I need a callback when every any TileBase is changed inside tile palette window
    What do you mean when a TileBase is change inside the Tile Palette window?

    - I want to remove drag functionality in scene view when I am editing a tilemap
    I do not think you can change this functionality since this is tied to whole Editor View. Could I ask what issues you face with this?