removecomponents

This commit is contained in:
ntr committed 2023-07-02 14:42:38 +10:00
1 parent d7672612cc
commit 828a8e963e
4 files changed
+51

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RemoveComponentName : MonoBehaviour {
public void RemoveComponents () {
MeshRenderer[] meshes = GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer c in meshes) {
DestroyImmediate(c, true);
}
}
}