I created a new scene with a empty object and added a “Spawner” script that creates 100 x 2 x 100 cubes. On my PC I have about 16 fps, the bottle neck is the CPU. Camera.render is 99% and Drawing is 70%. I thought that batching is the problem. When I checked, “SetPass” Calls: 43 and Draw Calls: 154. Is this normal? I remember loading a project with a lot more complicated geometry and having 60 fps.
My PC:
CPU: AMD FX-8350
GPU: AMD RX 470
Script:
public class Spawn : MonoBehaviour
{
public GameObject cube;
GameObject[,,] terrain = new GameObject[100, 2, 100];
void Awake()
{
for (int a = 0; a < terrain.GetLength(0); a++)
for (int b = 0; b < terrain.GetLength(1); b++)
for (int c = 0; c < terrain.GetLength(2); c++)
{
Vector3 vector3 = new Vector3(a, b, c) * 1.5f;
terrain[a, b, c] = Instantiate(cube, vector3, Quaternion.identity, transform);
}
}
}
Whole project(1.3MB):