Hello Guest

Author Topic: Tiles from tilemap are appearing much larger than expected  (Read 4566 times)

negative_zero

  • Newbie
  • *
  • Posts: 10
    • View Profile
Tiles from tilemap are appearing much larger than expected
« on: June 13, 2014, 12:06:08 am »
Hi, I apologize in advance if this is a very n00bish issue, I'm pretty new to game dev (6 months?) and I'm very new to 2D Toolkit, which I just dove into a few days ago.

Basically, my issue is that using this tutorial:

http://www.unikronsoftware.com/2dtoolkit/docs/latest/tilemap/tutorial.html

I have set up a tilemap, which appears to work fine except... the tiles are appearing about 4? times as large as expected when placed next to my other assets?  Everything is on the same z-axis so it's not a depth issue I don't think.  My tiles are all 64x64 but even using the same exact tiles, they are coming out much larger when used in my tilemap.

I'm using Unity 4.3 with the 2D mode, so maybe that is related to my issue?  Do I have to do something special to make it work with 4.3s 2D mode?  I followed the tutorial above to the letter except for this part, which I believe is not possible in 2D mode:

"Part 2 - Basic painting.
1. Make sure your scene view is set to "Back" and "Perspective" is turned off."

Anyway, kind of lost and not sure how to progress.  I'm attaching an image so you can see what I mean.
« Last Edit: June 13, 2014, 12:10:28 am by negative_zero »

negative_zero

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Tiles from tilemap are appearing much larger than expected
« Reply #1 on: June 13, 2014, 12:12:53 am »
I'm not sure if my image attached correctly, if not, here it is:

https://www.dropbox.com/s/w4cjfddvvjny7lp/2dtoolkitissue.png

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tiles from tilemap are appearing much larger than expected
« Reply #2 on: June 13, 2014, 08:24:56 am »
the size in the sprite collection (pixels per meter) determines how big it is relative to everything else. Chagne it to match your character sprite, then switch to the tilemap editor settings, and in tile size press reset to have it rearrange to fit the new size.

negative_zero

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Tiles from tilemap are appearing much larger than expected
« Reply #3 on: June 14, 2014, 08:00:17 am »
Cool thanks, that works!

One more question... I basically just want to use the tile map as a level editor with a bunch of prefabs that I have.  In the tutorial that I did, it had me load in a sprite sheet and then in the tile map choose data -> prefab to have the sprite replaced with the prefab during runtime.  Is there a quicker / easier way to do this?  I don't really have a sprite sheet that relates to my prefabs so I'd either have to create a sprite sheet full of sprites that represent my prefabs, or just make a blank sprite sheet or something and link the prefabs to it.  Neither way really seems ideal...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tiles from tilemap are appearing much larger than expected
« Reply #4 on: June 14, 2014, 10:44:58 am »
You can link any prefab to it. You dont have to import the sprites using a spritesheet, any old sprite will just work. It should ideally be imported into the same collection as the rest of the tiles for draw call optimization purposes.