private void CalculateNumberOfinstatiates() { Vector3 temp = ((max - min) / sizeOfSprite) + Vector3.one * offset; temp = MyMaths.Vector_Ceil(temp); for (int i = 0; i < 3; i++) { NumberOfInstatiates[i] = MyMaths.Magnitude(temp[i]); } }
//Calculates the numer of prefabs which must be used in each dimention private static void CalculateNumberOfInstances() { Vector3 temp = (max - min) / sizeOfSprite; //Rounds all values inside vector up temp = MyMaths.Vector_Ceil(temp); for (int i = 0; i < 3; i++) { //Number of instances to be created must be positive NumberOfInstances[i] = MyMaths.Magnitude(temp[i]); } }