Hello Guest

Author Topic: 2dToolkit Tilemap - Tile reverts orientation on play  (Read 3531 times)

bartleycollin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
2dToolkit Tilemap - Tile reverts orientation on play
« on: July 15, 2014, 05:53:54 pm »
I have a problem with the Tilemap editor. The title pretty much explains it all, but I'll go a bit further. Basically, in my game, I have a few tiles that rely on prefabs. No big deal. They work as desired, but with one problem. The editor FORCES them to be in their original orientation. So, If I flip them at all in the tilemap editor, and THEN hit play, it will flip them to how they were before. How can I get around this?

P.S. It ONLY does this for prefabs.

Thanks!

-Collin

bartleycollin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2dToolkit Tilemap - Tile reverts orientation on play
« Reply #1 on: July 15, 2014, 09:55:11 pm »
Anyone?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2dToolkit Tilemap - Tile reverts orientation on play
« Reply #2 on: July 15, 2014, 11:21:17 pm »
That is intentional for performance reasons. When you flip, rotate or do anything else to your tilemap tiles, we bake the transform and merge it into the final mesh and is no different performance wise to normal tiles. When you apply the same on a prefab, it cant be baked, so the prefab will need the scale applied to it. This breaks batching and if used on many such tiles, it can cause severe slowdowns.

Anyway, if you want to enable this its a couple lines of code. Happy to give you a patch as long as you're aware of the downsides.