Skip to content

Commit 35e2981

Browse files
committed
Change improve console output
1 parent 5667b9c commit 35e2981

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

Assets/Plugins/WebGL/WebGLTools/WebGlBridge.Commands.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void ToggleInfoPanel()
111111
/// Log an example message to see if it is rendered correctly, and to see the stacktrace
112112
/// </summary>
113113
[WebGlCommand(Description = "Log an example debug message")]
114-
public void LogDebugMessage()
114+
public void LogExampleMessage()
115115
{
116116
Debug.Log("This is an <color=#ff0000>example</color> message, showing off <color=#ff00ff>rich text</color> support!");
117117
}
@@ -120,8 +120,8 @@ public void LogDebugMessage()
120120
/// Log a custom message to test Debug.Log in general
121121
/// </summary>
122122
/// <param name="message">Message that will be logged</param>
123-
[WebGlCommand(Description = "Log a custom debug message")]
124-
public void LogDebugMessage(string message)
123+
[WebGlCommand(Description = "Log a custom message")]
124+
public void LogMessage(string message)
125125
{
126126
Debug.Log(message);
127127
}

Assets/Plugins/WebGL/WebGLTools/WebGlBridge.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public void Help()
9090
}
9191
}
9292

93-
sb.AppendLine($") -> {commandAttribute.Description}");
93+
sb.AppendLine($"); <color=#555555FF>-> {commandAttribute.Description}</color>");
9494
}
9595
}
9696

97-
sb.AppendLine("\nRun a command with 'unityGame.SendMessage(\"WebGL\", \"COMMAND_NAME\",PARAMETER)'");
97+
sb.AppendLine("\nRun a command with 'unityGame.SendMessage(\"WebGL\", \"COMMAND_NAME\",PARAMETER);'");
9898
Debug.Log(sb.ToString());
9999
}
100100
}

Assets/Plugins/WebGL/WebGLTools/WebGlPlugins.jslib

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
if(typeof onAddTimeTracker !== 'undefined') {
4545
onAddTimeTracker(eventNameText);
4646
}
47-
48-
console.log(`Time tracker event ${eventNameText}: ${currentTime}ms`);
47+
48+
var currentTimeRounded = currentTime.toFixed(2);
49+
console.log(`Time tracker event ${eventNameText}: ${currentTimeRounded}ms`);
4950
},
5051

5152
_ShowInfoPanel: function () {

Assets/WebGLTemplates/Develop/debug-console.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
text-align: left;
99
font-family: "Lucida Console", "Courier New", monospace;
1010
font-size: small;
11+
word-break: break-all;
1112
}
1213

1314
#debugConsole .log-entries{

0 commit comments

Comments
 (0)