var grassBlock : Transform;
function Update () {
for(var grassLayerX = -5; grassLayerX < 5; grassLayerX++)
for(var grassLayerZ = -5; grassLayerZ < 5; grassLayerZ++)
{
grassBlock = Instantiate(grassBlock, Vector3 (grassLayerX, 0,grassLayerZ)Quaternion.identity);
}
}
The original script had the grass layer variables at -500.
This script is supossed to generate a flat grass terrain from a prefab I made. But with the original it won’t open. I tried compiling it and it would just come up with an errror screen I’ve never seen before saying : ERROR failed to initialize the player Could not preload global game manager #0. I think it’s saying something about the build settings and level 0 but I did set the level to 0 in the build settings. Then I tried making it -5 in the script above and it works but it’s SUPER laggy. The thing is it’s not my computer because I just got a brand new one and it’s has a really good processor and stuff all the newest parts and all other really HD games work smoothly.
So what’s wrong is it because of the generation? Will it get better FPS after a minute or 2? Please help!