Beispiel #1
0
        private void UpdateMesh(bool ListUpdate = true)
        {
            if (ListUpdate)
            {
                UpdateMainMeshList();
            }
            UnityEngine.Object.Destroy(CopyMesh);
            MeshExtraLine = string.Empty;

            if (GetSelectMeshID() != -1)
            {
                int GSMI = GetSelectMeshID();
                if (GSMI >= 0)
                {
                    MeshExtraLine = MeshNameList[GSMI];
                }
                CopyMesh = UnityEngine.Object.Instantiate(SelectMesh);
                CopyMesh.MarkDynamic();
                MeshRemodeling.ChangeScale(CopyMesh, Scale);
                MeshRemodeling.ChangeColor(CopyMesh, GetColor(true, true), VertexColorIsOn);
                MeshRemodeling.Recalculate(CopyMesh);
            }

            GO.ObjectItself.GetComponent <MeshFilter>().sharedMesh = CopyMesh;
            ListCountMemory[0] = MainMeshList.Count;
        }
Beispiel #2
0
        private void UpdateColor()
        {
            Color NewColor = GetColor(true, true);

            if (preColor != NewColor)
            {
                MeshRemodeling.ChangeColor(ParentObject.GetComponent <MeshFilter>().sharedMesh, NewColor, VertexColorIsOn);
                if (GO.ObjectItself.GetComponent <MeshFilter>().sharedMesh != null)
                {
                    MeshRemodeling.ChangeColor(GO.ObjectItself.GetComponent <MeshFilter>().sharedMesh, NewColor, VertexColorIsOn);
                }
                preColor = NewColor;
            }
        }