private GameObject NodeGameObject(GraphNodeContextData node) { var gameObject = new GameObject(); gameObject.transform.position = node.Position; gameObject.transform.parent = Root; var mesh = gameObject.AddComponent <MeshFilter>().mesh = new Mesh(); gameObject.AddComponent <MeshRenderer>().material = Material; GeometryProvider.Build( mesh, new IcosahedronGeometryBuilder(), new GeometryBuilderSettings { Vertex = new GeometryBuilderVertexSettings { Scale = node.Scale, Rotation = node.Rotation } }); return(gameObject); }
private void OnUpdatePrimitive() { GeometryProvider.Build(_mesh, _builder, _settings); }