Beispiel #1
0
        public void ChangeTheMesh()
        {
            var shape = new Shape(segmentsNum, segmentT, radius);

            Vector3[]  surfacePoints = DrawShape.SetUpPoints(shape);
            MeshFilter mf            = gameObject.GetComponent <MeshFilter>();

            mf.mesh = MeshCreatorStatic.Create3dMesh(surfacePoints, z);
            MeshRenderer mr = gameObject.GetComponent <MeshRenderer>();

            mr.material = new Material(Shader.Find("Standard"));
        }