本文整理汇总了C#中BuildInfo.GetTimeReadable方法的典型用法代码示例。如果您正苦于以下问题:C# BuildInfo.GetTimeReadable方法的具体用法?C# BuildInfo.GetTimeReadable怎么用?C# BuildInfo.GetTimeReadable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BuildInfo
的用法示例。
在下文中一共展示了BuildInfo.GetTimeReadable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawGUI
public override void DrawGUI(Rect position, BuildInfo buildReportToDisplay)
{
GUILayout.Space(2); // top padding for scrollbar
_scrollPos = GUILayout.BeginScrollView(_scrollPos);
GUILayout.BeginHorizontal();
GUILayout.Space(10); // extra left padding
GUILayout.BeginVertical();
GUILayout.Space(10); // top padding
// report title
GUILayout.Label(buildReportToDisplay.SuitableTitle, BuildReportTool.Window.Settings.MAIN_TITLE_STYLE_NAME);
GUILayout.Space(10);
// two-column layout
GUILayout.BeginVertical();
GUILayout.BeginHorizontal();
GUILayout.BeginVertical(GUILayout.MaxWidth(350));
GUILayout.Label(Labels.TIME_OF_BUILD_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
GUILayout.Label(buildReportToDisplay.GetTimeReadable(), BuildReportTool.Window.Settings.INFO_SUBTITLE_STYLE_NAME);
GUILayout.Label("Report generation took:", BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
GUILayout.Label(buildReportToDisplay.ReportGenerationTime.ToString(), BuildReportTool.Window.Settings.INFO_SUBTITLE_STYLE_NAME);
BuildReportTool.Window.Utility.DrawLargeSizeDisplay(Labels.BUILD_TOTAL_SIZE_LABEL, BuildReportTool.Window.Utility.GetProperBuildSizeDesc(buildReportToDisplay), buildReportToDisplay.TotalBuildSize);
GUILayout.Space(20);
string emphasisColor = "black";
if (EditorGUIUtility.isProSkin)
{
emphasisColor = "white";
}
GUILayout.Label("<color=" + emphasisColor + "><size=20><b>" + buildReportToDisplay.BuildSizes[1].Name + "</b></size></color> are the largest,\ntaking up <color=" + emphasisColor + "><size=20><b>" + buildReportToDisplay.BuildSizes[1].Percentage + "%</b></size></color> of the build" + (buildReportToDisplay.HasStreamingAssets ? "\n<size=12>(not counting streaming assets)</size>" : ""), BuildReportTool.Window.Settings.INFO_TEXT_STYLE_NAME);
GUILayout.Space(20);
GUILayout.EndVertical();
GUILayout.BeginVertical(GUILayout.MaxWidth(350));
GUILayout.Label("Made for:", BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
GUILayout.Label(buildReportToDisplay.BuildType, BuildReportTool.Window.Settings.INFO_SUBTITLE_STYLE_NAME);
GUILayout.Label("Built in:", BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
GUILayout.Label(buildReportToDisplay.UnityVersionDisplayed, BuildReportTool.Window.Settings.INFO_SUBTITLE_STYLE_NAME);
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (buildReportToDisplay.HasUsedAssets)
{
GUILayout.BeginVertical();
GUILayout.Label("Top ten largest in build:", BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
DrawAssetList(buildReportToDisplay.UsedAssets);
GUILayout.EndVertical();
}
if (buildReportToDisplay.HasUsedAssets && buildReportToDisplay.HasUnusedAssets)
{
GUILayout.Space(50);
}
if (buildReportToDisplay.HasUnusedAssets)
{
GUILayout.BeginVertical();
GUILayout.Label("Top ten largest not in build:", BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME);
DrawAssetList(buildReportToDisplay.UnusedAssets);
GUILayout.EndVertical();
}
GUILayout.EndHorizontal();
GUILayout.EndVertical();
GUILayout.Space(20);
GUILayout.EndVertical();
GUILayout.Space(20); // extra right padding
GUILayout.EndHorizontal();
GUILayout.EndScrollView();
}