Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

Formatting

class in Unity.ProjectAuditor.Editor.Utils

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Methods for consistently formatting values

Static Methods

Method Description
FormatDateTime Formats a given DateTime object as a string in the format "yyyy/MM/dd HH:mm".
FormatDuration Formats a given TimeSpan object as a string in the format "HH:mm:ss".
FormatDurationWithMs Formats a given TimeSpan object as a string in the format "HH:mm:ss".
FormatFramerate Formats a given float framerate as a string in the format "X fps".
FormatHz Formats a given frequency as a string in the format "X Hz" or "X kHz".
FormatLengthInSeconds Formats a given float duration as a string in the format "X.XXX s".
FormatPercentage Formats a decimal number as a percentage with a specified number of decimal places.
FormatSize Formats a given size in bytes as a string in the format "X bytes".
FormatTime Formats a given TimeSpan object as a string in the format "X ms", "X s", or "X min", depending on the length of the time span.