public GameObject SpawnBox(bool network = true) { GameObject newBox = BoxGenerator.CreateBox(IndicatorPositions, network); newBox.name = string.Format("ProceduralBox{0:D2}", proceduralBoxes4.Count + 1); if (IndicatorCount == 4) { proceduralBoxes4.Add(newBox); } else if (IndicatorCount == 8) { proceduralBoxes8.Add(newBox); } proceduralBoxes.Add(newBox); UnSpawn(); return(newBox); }
public static GameObject CreateBox(IEnumerable <Vector3> inPoints, bool network = true) { var boxGenerator = new BoxGenerator(inPoints); return(boxGenerator.Calculate2(network)); }