void InitializeIndex(Vector3 center, Vector3 scale, int count, int index) { var matrices = RandomUtils.Matrices(center, scale, count, index * 18f + 20f); Matrices[index] = new SharedArray <Matrix4x4, float4x4>(matrices); var colors = new SharedArray <Vector4, float4>(RandomUtils.Colors(count)); Colors[index] = colors; var block = new MaterialPropertyBlock(); block.SetVectorArray(ColorShaderProperty, colors); PropertyBlocks[index] = block; }