Exemple #1
0
        // Use this for initialization
        void Start()
        {
            tubeGraphic = GetComponent <TubeGraphic>();
            meshFilter  = GetComponent <MeshFilter>();
            if (!meshFilter)
            {
                meshFilter = gameObject.AddComponent <MeshFilter>();
            }

            meshRenderer = GetComponent <MeshRenderer>();
            if (!meshRenderer)
            {
                meshRenderer = gameObject.AddComponent <MeshRenderer>();
            }

            meshFilter.mesh = tubeGraphic.GetMesh();
        }
Exemple #2
0
 public override void RefreshMeshData()
 {
     SetMesh(tubeGraphic.GetMesh());
     mesh = _mesh;
 }