How can I make unity 3d not draw cubes that don’t touch air(I need better fps), this seems to be to much for me but here is the code that makes a area in game. Please if anyone can even just improve my fps it would be awesome.
public class ResourceSpawn : MonoBehaviour
{
public Transform packIce;
public Transform Ice;
void Start()
{
for (int x = 0; x < 40; x++)
{
for (int y = 0; y > -30; y--)
{
for(int z = 0; z < 40; z++)
{
Instantiate (packIce, new Vector3(x, y, z), Quaternion.identity);
}
}
}
iceSpike();
}
Also should I be using start or awake to call this code once? I know start is called once and discarded and awake is called before the game is visible I think. Am I wrong?