2D Tile Map Sprite Image Spanning Multiple Tiles

Hi Guys,

im new to unity and would really appreciate some help.

i have created a 2D TileMap and have each Tile represented in game with a Sprite. it works but my concern is as it grows it will become very inneficient also, the repeating patterns really stand out.

i wanted to know if it is possible to use a larger sprite/image and have it span accross multiple tiles ?

something like the below:

3463272--274789--upload_2018-4-16_8-7-6.png

the blue shows tiles that have a reapeating 64x64 pixel image, it works but does not look great

what i’m aiming for this this:

3463272--274791--upload_2018-4-16_8-8-16.png

although the tile objects are still there, the end user just sees a 256x128 pixel image, if i then did the below:

3463272--274792--upload_2018-4-16_8-10-23.png

the tiles at the end would begin to repeat the image.

as i said, i’m new to this and would appreciate any help

thanks

3463272--274789--upload_2018-4-16_8-7-6.png

You should be able to change the gap between the cells on the tilemap object. I don’t have Unity right in front of me to confirm this, but I believe the docs are here: Unity - Manual: Creating Tilemaps

(See Adjusting the Grid for Tilemaps). That said, if you are not using a pixel-perfect camera, you will likely see anomalies between sprites.

Here is my code for setting pixel perfect orthographic size:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PixelPerfectCamera : MonoBehaviour
{

    public int ppuScale = 2;
    public int pixelsPerUnit = 32;

    // Use this for initialization
    void Start ()
    {
        double orthoSize = 1f / ((2f / Screen.height) * pixelsPerUnit);
        orthoSize = orthoSize / ppuScale;

        Camera.main.orthographicSize = (float) orthoSize;
    }
}

i appreciate the feedback however, i may not have explained it correctly.

i dont have an issue with there being a gap between tiles, im looking to use a large image to spread across multiple tiles, not a single image that is identical in each tile

Can you just break the image apart into tile-sized chunks ?
Sorry, I still don’t think I understand what you are trying to achieve.

this is what i want to achieve, it has a solution but no example

https://gamedev.stackexchange.com/questions/127992/how-to-render-a-single-texture-across-multiple-tiles-unity2d