View flights(CSVDataSource csvds) { // create a view builder with a Lines topology ViewBuilder vb = new ViewBuilder(MeshTopology.Lines, "Flights visualisation"); //initialise the view builder with the number of data points parent GameObejct vb.initialiseDataView(csvds.DataCount); //Gradient g = new Gradient(); //GradientColorKey[] gck = new GradientColorKey[2]; //gck[0] = new GradientColorKey(Color.blue, 0); //gck[1] = new GradientColorKey(Color.blue, 1); //g.colorKeys = gck; var logT = csvds["y"].Data.Select(x => Mathf.Log(x)).ToArray(); vb.setDataDimension(csvds["X"].Data, ViewBuilder.VIEW_DIMENSION.X). setDataDimension(csvds["y"].Data, ViewBuilder.VIEW_DIMENSION.Z). setSize(csvds["X"].Data). createIndicesConnectedLineTopology(csvds["vol"].Data). setDataDimension(csvds["modec"].Data.Select(x => x).ToArray(), ViewBuilder.VIEW_DIMENSION.Y); //Enumerable.Repeat(1f, dataSource[0].Data.Length).ToArray() // Material mt = new Material(Shader.Find("IATK/OutlineDots")); // mt.mainTexture = Resources.Load("circle-outline-basic") as Texture2D; // mt.renderQueue = 3000; Material mt = new Material(Shader.Find("IATK/LineAndDotsShader")); mt.renderQueue = 3000; mt.SetFloat("_MinSize", 0.01f); mt.SetFloat("_MaxSize", 0.05f); View view = vb.updateView().apply(gameObject, mt);//.UpdateViewColors(Color.red); return(view); }