EditorUtility.FormatBytes Manual     Reference     Scripting  
Scripting > Editor Classes > EditorUtility
EditorUtility.FormatBytes

static function FormatBytes (bytes : int) : string

Description

Returns a text for a number of bytes.

print (EditorUtility.FormatBytes(100)); // prints "100 bytes"
print (EditorUtility.FormatBytes(2048)); // prints "2.0 KB"