Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        meshfilter = this.GetComponent <MeshFilter>();
        trislicer  = new TriSlicer(meshfilter.mesh, this.driftFactor, maxPieces);

        trislicer.InitPlane(Mathf.Abs(this.transform.lossyScale.x) * 5f);
        this.transform.localScale = new Vector3(1, 1, 1);

        if (this.sliceCountText)
        {
            this.sliceCountTextComponent = this.sliceCountText.GetComponent <Text>();
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        meshfilter = this.GetComponent<MeshFilter>();
        trislicer = new TriSlicer(meshfilter.mesh, this.driftFactor, maxPieces);

        trislicer.InitPlane(Mathf.Abs(this.transform.lossyScale.x)*5f);
        this.transform.localScale = new Vector3(1,1,1);

        if (this.sliceCountText)
        {
            this.sliceCountTextComponent = this.sliceCountText.GetComponent<Text>();
        }
    }