下記AnimationコンポーネントをUnityエディタ上で削除する場合
extension.cs
if (gameObj.GetComponent<Animation>()) //Animationコンポーネントが存在するか
{
// Destroy(gameObj.GetComponent<Animation>()); // -> 消せず、、
// GameObject.Destroy(gameObj.GetComponent<Animation()); // -> 消せず
Animation animComponent = (Animation)gameObj.GetComponent<Animation>();
GameObject.DestroyImmediate(animComponent); // -> 消せた
}
DestroyImmediateを使うと即座に消える。