Hello? I’m trying to make sphere that only very tiny part is covered with square tile. And this is simple explain that what I want to do.

Well… More detail about that image is sphere is the Earth and blue tile will be map from the server so, I have to cover map image over sphere.
So, I think now is use material. I received Map image from server successfully and set that image as base map then set that material to sphere object proportions of the image are ruined.
I’m very beginner so, I’m very trouble about this. Is there anything to solve this problem very simple to follow?
And this is the code that I used for use material.
private static Sprite ByteToImage(byte[] buf)
{
try
{
// Create a new Texture2D and load the image data
Texture2D texture = new Texture2D(1, 1);
Texture2D empty = new Texture2D(16384, 16384);
Texture2D combine = new Texture2D(empty.width, empty.height);
texture.LoadImage(buf);
texture.wrapMode = TextureWrapMode.Clamp;
int xOffset = (empty.width - texture.width) / 2;
int yOffset = (empty.height - texture.height) / 2;
for (int x = 0; x < empty.height; x++)
{
for (int y = 0; y < empty.height; y++)
{
Color color;
if (x >= xOffset && x < xOffset + texture.width && y >= yOffset && y < yOffset + texture.height)
{
int imageX = x - xOffset;
int imageY = y - yOffset;
color = texture.GetPixel(imageX, imageY);
}
else
{
color = empty.GetPixel(x, y);
}
combine.SetPixel(x, y, color);
}
}
combine.Apply();
combine.wrapMode = TextureWrapMode.Clamp;
empty.wrapMode = TextureWrapMode.Clamp;
m_TileMaterial.mainTexture = combine;
// Create a sprite using the texture
Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
sprite.name = "Map";
if (sprite == null)
{
Debug.LogError("Sprite is null");
return null;
}
Debug.Log("Sprite created successfully");
buf = null;
return sprite;
}
catch (Exception e)
{
Debug.LogError(e);
return null;
}
}

