using System.Collections; using System.Collections.Generic; using UnityEngine; public class ConvertToRegularMesh : MonoBehaviour { [ContextMenu("Convert")] void Convert() { SkinnedMeshRenderer skinnedMeshRenderer = GetComponent(); MeshRenderer meshRenderer = gameObject.AddComponent(); MeshFilter meshFilter = gameObject.AddComponent(); meshFilter.sharedMesh = skinnedMeshRenderer.sharedMesh; meshRenderer.sharedMaterials = skinnedMeshRenderer.sharedMaterials; DestroyImmediate(skinnedMeshRenderer); DestroyImmediate(this); } }