Hello. My name is Andrew and I am the Founder of Code to Reality Studios (c). We are currently working on a 2D open-world survival game
such as Terraria or Starbound.
What I need help on:
When I generate the chunks for my world and load up the collisions and UV maps, the UVs seem to go over their Uv ‘tile’ boundaries in the Texture
. Here is what it looks like:
Here is the Texture
’s properties:
To generate the UVs I have, in a script called Tile.cs, a function called UV.
public struct UV { public int x; public int y; }
const float tileSize = 0.25f; //How much space we take out of the tilesheet for our sprite
public virtual UV TexturePosition(Solidity solidity)
{
UV uv = new UV();
uv.x = 0;
uv.y = 0;
return uv;
}
And in the, lets say TileGrass.cs, we override the UV mapping for every tile to have their own part of the tilesheet.
//TileGrass.cs
public override UV TexturePosition(Solidity solidity)
{
UV tile = new UV();
tile.x = 3;
tile.y = 0;
return tile;
}
Why are the single tile’s textures showing part of their surrounding textures in the tilesheet? If anyone can help, it would be most appreciated.
Thank you!

