public static GraphPlotter Create(MeshFilter meshFilter, int iterations) { var plotter = new GraphPlotter { meshFilter = meshFilter }; plotter.meshFilter.sharedMesh = new Mesh(); plotter.RebuildMeshCache(iterations); return(plotter); }
public static GraphPlotter Create(int iterations) { var plotter = new GraphPlotter { meshFilter = (new GameObject("GraphPlotter")).AddComponent <MeshFilter>() }; plotter.meshFilter.sharedMesh = new Mesh(); plotter.gameObject.AddComponent <MeshRenderer>(); plotter.RebuildMeshCache(iterations); return(plotter); }
public static GraphPlotter Create( int iterations ) { var plotter = new GraphPlotter {meshFilter = ( new GameObject ( "GraphPlotter" ) ).AddComponent <MeshFilter>()}; plotter.meshFilter.sharedMesh = new Mesh(); plotter.gameObject.AddComponent<MeshRenderer>(); plotter.RebuildMeshCache( iterations ); return plotter; }
public static GraphPlotter Create( MeshFilter meshFilter, int iterations ) { var plotter = new GraphPlotter { meshFilter = meshFilter }; plotter.meshFilter.sharedMesh = new Mesh(); plotter.RebuildMeshCache( iterations ); return plotter; }