void Start () {
#if UNITY_EDITOR
for (int i = 0; i < parts.Length; i++) {
Debug.Log(parts[i]);
string part = parts[i];
GameObject o = Resources.Load (part) as GameObject;
// Material material = Resources.Load (part + "mat", typeof(Material)) as Material;
// o.GetComponentInChildren<SkinnedMeshRenderer> ().material = material;
Instantiate (o, new Vector3 (0, 0, 0), Quaternion.identity);
Texture2D t2d = AssetPreview.GetAssetPreview (o);
byte[] bytes = t2d.EncodeToPNG ();
Debug.Log ("Path: " + Application.dataPath + "/Exteel/ExteelScripts/Thumbnails/" + parts [i] + ".png");
File.WriteAllBytes(Application.dataPath + "/Exteel/ExteelScripts/Thumbnails/" + parts[i]+".png", bytes);
}
#endif
}
}