Skip to content

Commit 9d3fcae

Browse files
committed
Add application version to html header
1 parent 77b054e commit 9d3fcae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Assets/Plugins/WebGL/WebBridge/WebBridge.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private static void SetGlobalVariables()
8585
}
8686
WebToolPlugins.SetVariable("webGlVersion", webGraphics);
8787
WebToolPlugins.SetVariable("unityVersion", Application.unityVersion);
88+
WebToolPlugins.SetVariable("applicationVersion", Application.version);
8889
#if !UNITY_EDITOR && UNITY_WEBGL
8990
WebToolPlugins.SetVariable("unityCaptureAllKeyboardInputDefault", WebGLInput.captureAllKeyboardInput?"true":"false");
9091
#endif

Assets/WebGLTemplates/Develop/debug-console.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ function getInfoPanel() {
553553
infoPanel.id = 'infoPanel';
554554
document.body.appendChild(infoPanel);
555555
var infoHeader = document.createElement('h3');
556-
if (typeof unityVersion != `undefined` && typeof webGlVersion != `undefined`) {
556+
if (typeof unityVersion != `undefined` && typeof applicationVersion != `undefined` && typeof webGlVersion != `undefined`) {
557557
// Set by WebGlBridge in Unity
558-
infoHeader.textContent = `Unity ${unityVersion} (${webGlVersion})`;
558+
infoHeader.textContent = `Unity ${unityVersion}@${applicationVersion} (${webGlVersion})`;
559559
} else {
560560
infoHeader.textContent = `Unity InfoPanel`;
561561
}

0 commit comments

Comments
 (0)