// 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>(); } }
// 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>(); } }