using UnityEngine;
using UnityEditor;
using System.Collections;
public class DeleteCollider_try01 : ScriptableWizard
{
private SelectionMode modePrefs;
private bool showProgress = false;
private string currentName;
private float prog = 0;
private int count = 0;
[MenuItem("CUSTOM/Delete Select Collider")]
static void Replace()
{
ScriptableWizard.DisplayWizard("Delete Select Mesh Collider", typeof(DeleteCollider_try01), "Close", "Start");
}
void OnWizardUpdate()
{
if (Selection.gameObjects.Length <= 0)
{
isValid = false;
}
else
{
isValid = true;
}
}
void OnWizardOtherButton()
{
GameObject[] obs = Selection.gameObjects;
foreach (GameObject ob in obs)
{
Destory((ob.GetComponent(typeof(MeshCollider)) as Object));
}
EditorUtility.ClearProgressBar();
}
void OnWizardCreate()
{
EditorUtility.ClearProgressBar();
//Debug.Log("Create!!!");
}
}
The message of error:error CS0103: The name `Destory’ does not exist in the current context
How to delete the component of selected gameobject?\
Thank all