Hello Guest

Author Topic: Tilemap: flip tile with associated prefab problem  (Read 3925 times)

ccampama

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Tilemap: flip tile with associated prefab problem
« on: October 07, 2013, 01:00:55 pm »
Hello all!

We are working with 2D Toolkit to create a Tilemap and making a gravity-driven sprite to collide with it. Everything has been fine until we have found a problem: if we place a tile that has a prefab associated to it, when we use the flip tool in the Paint menu, the tile is shown fine in the editor, but it reverts to its original rotation when we hit "Play", as if it didn't have any flip flag on it. Are we doing something wrong?

Thank you in advance!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap: flip tile with associated prefab problem
« Reply #1 on: October 07, 2013, 11:48:20 pm »
This is a known "issue". I use the term loosely because it was intentionally omitted - Because the system doesn't know what your prefabs contain, it doesn't know how to flip it. Flipping will involve messing about with the localScale, and as soon as you do this you start increasing drawcalls due to a limitation in Unitys batching. If you'd like to enable this (and understand the implications) I will be happy to share some code.

ccampama

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Tilemap: flip tile with associated prefab problem
« Reply #2 on: October 08, 2013, 03:58:04 pm »
Ah, ok ok. The idea is to keep drawcalls to a minimum because of our target platforms, and as it should only affect a few of the tiles, we will stick to making rotated versions of them. If we should change our mind later, we would write again here to ask you for the source code modifications.
Thank you very much for your prompt help and congrats for the engine!