- Home /
 
Determining the size of a prefab
Hey there. Im making a 'infinite runner' simple game, and i wish to generate a specific prefab at runtime. However im tryng to sum that prefab size to the next generation Z, so they can 'fit'.
 Instantiate (spawnPoint ,new Vector3(xCount,yCount, zCount); , Quaternion.identity);
 zCount += spawnPoint.renderer.bounds.size.z;
 Debug.Log(zCount);
 
               However, this is aways returns me 0. Im tryng to get the z size of the object so i can sum to the next object.
Thanks alot for the attention !
               Comment
              
 
               
              Your answer