using UnityEngine;
public class VoxelWorld : MonoBehaviour
{
public int worldWidth = 16;
public int worldHeight = 16;
public int worldDepth = 16;
public GameObject cubePrefab;
void Start()
{
GenerateWorld();
}
void GenerateWorld()
{
for (int x = 0; x < worldWidth; x++)
{
for (int y = 0; y < worldHeight; y++)
{
for (int z = 0; z < worldDepth; z++)
{
// Basit bir zemin oluşturma
if (y == 0)
{
Vector3 pos = new Vector3(x, y, z);
Instantiate(cubePrefab, pos, Quaternion.identity);
}
}
}
}
}
}