protected override void OnUpdate() { var count = enabledChunks.CalculateLength(); var positions = enabledChunks.GetComponentDataArray <ChunkPosition>(); chunkPositions.CopyFrom(ref positions, count); var args = new NativeArray <int>(4, Allocator.TempJob); args[0] = 1; args[1] = count; args[2] = 0; args[3] = 0; drawArgs.SetData(args); args.Dispose(); Debug.Log("Draw " + count + " chunks"); Graphics.DrawProceduralIndirect(MeshTopology.Points, drawArgs); }