public static Chunk GenerateChunk(Vector2 size, Vector2 leftMost) { GameObject newChunk = ObjectFactory.ChunkFactory(leftMost, size); GenerateObstacles(newChunk.GetComponent <Chunk>()); GenerateGround(newChunk.GetComponent <Chunk>()); return(newChunk.GetComponent <Chunk>()); }