void MeshChunks() { while (loader.Dequeue(out LoadedData data)) { if (chunkRenderer.ContainsKey(data.Pos)) { ChunkRenderer renderer = chunkRenderer[data.Pos]; renderer.CommitMesh(data); foreach (var pos in data.LightPos) { Debug.Log("Added light"); Instantiate(lightPrefab, renderer.transform).transform.position = pos; } } } }