public void RemovePrefab() { SS_WallObjects[] newPrefabs = new SS_WallObjects[theWallPrefabs.Length - 1]; for (int i = 0; i < theWallPrefabs.Length - 1; i++) { newPrefabs[i] = theWallPrefabs[i]; } theWallPrefabs = newPrefabs; }
public void AddPrefab() { SS_WallObjects[] newPrefabs = new SS_WallObjects[theWallPrefabs.Length + 1]; for (int i = 0; i < theWallPrefabs.Length; i++) { newPrefabs[i] = theWallPrefabs[i]; } newPrefabs[newPrefabs.Length - 1] = new SS_WallObjects(); newPrefabs[newPrefabs.Length - 1].thePrefab = SS_Common.SS_DefaultWallPrefab(); theWallPrefabs = newPrefabs; }