Plugin Author
pthowe
(@pthowe)
@bertzero ,
Sorry you were having trouble. I will give the version a test.
Thanks for letting me know.
Pthowe
I fixed it for myself.
The problem is that if you build the game with compression format gzip.
There is a chance that unity framework will not be defined.
This only counts for unity version 2020.
The error:”Unity framework not defined” in google chrome console will display if u uncomment the last echo in function 2020
//echo “<br>PageTxtStart: “.$game_page.” :endPageTxt<br>”;
To solve this I changed compression format in Unity to disabled as referenced here: https://forum.unity.com/threads/uncaught-referenceerror-unityframework-is-not-defined-at-htmlscriptelement-script-onload-webgl.803967/
I also changed in function 2020
$dataExtension = “.data.gz”;
$frameworkExtension = “.js.gz”;
$asmExtension = “.wasm.gz”;
To
$dataExtension = “.data”;
$frameworkExtension = “.js”;
$asmExtension = “.wasm”;
The shortcodes stopped working for me but [hs_unity3d_web_gl_gamepage] this one worked.
If I tested a shortcode with [hs_unity3d_web_gl_gamepage] and copied the shortcode that would appear above the game that shortcode worked. I typed the exact shortcode and that did not work I also copied and pasted all the shortcodes from howescape and that also did not work.
I hope this helped no bad intentions meant.
2 final things.
Is the game still embedded when I apply these changes.
The unity progression of the loading bar is out of bounds to the bottom or the loading bar is a little to the top and outside of the progression.
Did my changes do this, is it unity or is it something else?
Plugin Author
pthowe
(@pthowe)
@bertzero , I have seen the error and am working to understand the issue. In regards to the question about the loading bar. I found one difference which might address the issue. Since you have modified your version of the plugin. Here is a change which may help.
In the routine hs_unity3d_2020_3 find the line:
‘<canvas id=”unity-canvas”></canvas>’
change it to
‘<canvas id=”unity-canvas” width=’.$width.’ height=’.$height.’></canvas>’
This change will be included in my next update. Please let me know if this helps?
Peter
@pthowe, Sorry I forgot to reply,
Your fix did not work but I got it working so u can also close this support topic