using UnityEngine;
using System.Collections;
using UnityEditor;
public class RemoveComponents
{
[MenuItem("Tools/Remove MeshCollider")]
public static void RemoveMeshCollider()
{
GameObject[] colliders = Selection.gameObjects;
for (int i = 0; i < colliders.Length; i++)
{
MeshCollider mc = colliders[i].GetComponent();
if (mc)
{
GameObject.DestroyImmediate(mc);
}
}
Debug.Log("Remove MeshColliders complete!");
}
[MenuItem("Tools/Remove Animator")]
public static void RemoveAnimator()
{
GameObject[] colliders = Selection.gameObjects;
for (int i = 0; i < colliders.Length; i++)
{
Animator mc = colliders[i].GetComponent();
if (mc)
{
GameObject.DestroyImmediate(mc);
}
}
Debug.Log("Remove Animators complete!");
}
}