[Solved] My custom terrain generation plugin instantiates to much prefabs

Firstly, change your 25 lines of Instantiation to this: for (int i = -2; i< 3; i++) { for (int j = -2; j < 3; j++) { Instantiate(terrains[Random.Range(0,terrains.length)], Vector3(j*50, 0, i*50), Quaternion.identity); } } Secondly, you already have the gameobject in this call, so don’t use GameObject.Find() //it’s expensive So assuming the object that … Read more