public ComponentElement(int level, string name, string menuPath, string commandString)
{
this.level = level;
this.typeName = name.Replace(" ", string.Empty);
this.menuPath = menuPath;
if (commandString.StartsWith("SCRIPT"))
{
Texture miniThumbnail = (Texture)AssetPreview.GetMiniThumbnail(EditorUtility.InstanceIDToObject(int.Parse(commandString.Substring(6))));
this.content = new GUIContent(name, miniThumbnail);
}
else
{
int classID = int.Parse(commandString);
this.content = new GUIContent(name, (Texture)AssetPreview.GetMiniTypeThumbnailFromClassID(classID));
}
}