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

unity 2D Bug - Changing the "Default Brush" to "Prefab Brush" within tilepalette returns null?

Discussion in '2D' started by Shpendicus, May 17, 2020.

  1. Shpendicus

    Shpendicus

    Joined:
    Jan 12, 2018
    Posts:
    5
    Hi guys,

    I think I have discovered a pretty annoying bug in the 2D-extras//2D-Tilemap Editor packages, which is that, when you change the default brush to an own created "Prefab Brush" you are able to draw within the Grid in the SceneView but when you want to access the Tilemap's CellData at Runtime, I only get NULL back, when I use the same code to iterate over a default brush'ed Prefab-Tilepalette, everything is fine and I can access the tile variable at runtime.

    I would be giga hardcore glad if some1 has a solution to this, since I wanna be able to specifiy a complete different brush to my prefabs and create them dynamically with that brush preselcted.

    Best regards

    AP
     
    Last edited: May 17, 2020
  2. Shpendicus

    Shpendicus

    Joined:
    Jan 12, 2018
    Posts:
    5
    Does really no one know, how to be able to get the prefab-tile within a tilemap at runtime? I dont know why it only can "see" tiles within the tilemap and not a prefabtile, which derives from Tilebase, I desperately need to be able to place prefabs as tiles in the palette so I can add some different components to it.