Version: Unity 7.0 Alpha (7000.0)
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".
FormatFloat Formats a given float as a string.
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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961