public bool DrawPreview(string dataPath)
{
var texture = GetTexture (dataPath, false);
EditorGUILayout.BeginVertical ();
{
// Get Texture
if (texture != null) {
GUILayout.Label (texture, GUILayout.MaxWidth (MaxWidth (texture)), GUILayout.MaxHeight (MaxHeight (texture)));
} else {
EditorGUILayout.LabelField ("[ Empty Screenshot ]", _column1);
}
// In Build Enabled Check
if (!string.IsNullOrEmpty (dataPath)) {
EditorGUILayout.LabelField (System.IO.Path.GetFileName (dataPath), _column1);
} else {
EditorGUILayout.LabelField ("--");
}
EditorGUILayout.LabelField ("Screenshot Size: ", _column1);
string displayText;
if (texture != null) {
displayText = string.Format ("{0} x {1}", texture.width, texture.height);
} else {
displayText = "--";
}
EditorGUILayout.LabelField (displayText, _column1);
}
EditorGUILayout.EndVertical ();
return texture != null;
}