Having problems with your Unity3D WebGL game? Please start here. If you've read through the wiki, searched Google, etc. and still haven't resolved your issue, feel free to ask a question here.
Having problems with your Unity3D WebGL game? Please start here. If you've read through the wiki, searched Google, etc. and still haven't resolved your issue, feel free to ask a question here.
At 5/13/15 12:02 PM, PsychoGoldfish wrote: You can add other key codes to the ignore_keycodes array as needed.
Is there a way to do this to ignore scroll wheel inputs? In flash, you have to send js to the browser, and it doesn't work on every browser or every OS.
I don't use js or html5 so I wouldn't know if it was obvious. It'd be something I add post-haxe output.
At 5/13/15 04:24 PM, MSGhero wrote:At 5/13/15 12:02 PM, PsychoGoldfish wrote: You can add other key codes to the ignore_keycodes array as needed.Is there a way to do this to ignore scroll wheel inputs? In flash, you have to send js to the browser, and it doesn't work on every browser or every OS.
I don't use js or html5 so I wouldn't know if it was obvious. It'd be something I add post-haxe output.
I updated the original post with a scrollwheel example for you. Basically you can create a javascript event listener function for damn near any event. The first parameter passed to the function (using 'e' in these examples) will be an event object. Telling that object to preventDefault will stop it from preforming it's default browser behavior.
There's a pretty extensive list of javascript events at https://developer.mozilla.org/en-US/docs/Web/Events
WebGL is not meant to actually be used right now. It creates massive flaws that completely break gameplay. Also if you're trying to use it on chrome it refuses to read arrow key inputs for some reason.
Our webgl game is almost working perfectly on NG. But our save data is not saving! Apparently an iFrame issue? Is there any way we can get our game to save data?
At 7/23/15 02:06 AM, D-SuN wrote: Our webgl game is almost working perfectly on NG. But our save data is not saving! Apparently an iFrame issue? Is there any way we can get our game to save data?
Are you getting any errors in the developer console?
I struggled a bit today getting keyboard input working properly in Unity WebGL on Newgrounds, but finally have it working.
There's a couple of issues which might trip you up here.
Firstly, Unity's Input.inputString doesn't seem to work at all at the moment, so if you're using that you'll have to scan the keys using Input.GetKeyXXX.
Secondly, since NG hosts the game in an iframe, there's an issue with not having the focus set so that the game can receive key input.
You can fix this by changing index.html and adding the following to the <canvas> element:
onclick="window.focus()"
And also by adding this <script> block inside <body>:
<script>
window.onload = function() { window.focus(); }
</script>
Hope this helps!
At 7/23/15 02:08 PM, BrenTheMan wrote:At 7/23/15 02:06 AM, D-SuN wrote: Our webgl game is almost working perfectly on NG. But our save data is not saving! Apparently an iFrame issue? Is there any way we can get our game to save data?Are you getting any errors in the developer console?
Yup, PlayerPrefs won't be saved.
Here is a screenshot.
http://www.sun-studios.net/other/imagedump/july2015/Error.PNG
At 7/23/15 10:19 PM, D-SuN wrote: Yup, PlayerPrefs won't be saved.
Any other info? Can you click that triangle toggle next to the warning message?
At 7/23/15 10:55 PM, BrenTheMan wrote:At 7/23/15 10:19 PM, D-SuN wrote: Yup, PlayerPrefs won't be saved.Any other info? Can you click that triangle toggle next to the warning message?
Odly, this seems to not be an issue anymore :S
We've published out game, as the save data is now working. If I figure out why this has occured, then I'll do a post here for other to refer to.
I just enabled NPAPI so that I could play Unity games on Chrome here on NG. After relaunching Chrome with this enabled if I go to a Unity game it never loads. More specifically - the window where the game should be is just completely gone... It just shows the games description and then the comment section on the webpage. Why is that?
At 7/30/15 08:36 PM, Hero101 wrote: I just enabled NPAPI so that I could play Unity games on Chrome here on NG. After relaunching Chrome with this enabled if I go to a Unity game it never loads. More specifically - the window where the game should be is just completely gone... It just shows the games description and then the comment section on the webpage. Why is that?
This isn't the right thread for that. Post in the Help forum and make sure to link the game that you're having problems with.
All WebGL games I have tried (including mine) still requires Unity Web Player to be loaded though... :-)
is templatedata necessary? the file (zip) was uploaded successfully but the preview doesn't work.
templatedata is missing in my zip but it is no need in the new version is it?
At 10/13/15 10:24 PM, One-Eyed-Jack wrote: I Usaully don't ask these things, But I Need to know...
So, I Made this game in unity. But I Need to know before I upload. What is better? Webplayer? Or WebGL?
I Know webGL Allows Google Chrome users to play it too, Which is why I'm leaning more towards it. But I'm worried about graphics....
What do you guys think?
You can test both in the project preview before you publish it to the website
At 10/21/15 02:11 AM, ArsalanKhan wrote: Can we Use Flash ADS in WEBGYL game in Unity
No Flash Ads are for Flash games/movies...
Do you guys find that fewer people play or comments on games made in the webplayer / webgl on Newgrounds?
At 12/6/15 02:51 PM, Grenadetree wrote: Do you guys find that fewer people play or comments on games made in the webplayer / webgl on Newgrounds?
If you look at the under judgement games ( http://www.newgrounds.com/games/under_judgment ), there's a lot of old Unity Web Player games in there that haven't even gotten enough votes to be fully included in the portal. This is primarily die to Chrome no longer supporting it. It was for that reason, we removed support for future unity web player games, opting to only support WebGL stuff. So yeah, there is definitely less people playing those unity web player games,
As for the WebGL stuff, that really seems to depend. There have been a few games made with Unity WebGL that got fairly popular, while some just haven't gained traction. I know I, personally, can't even run most WebGL games due to the insane amount of memory they require. Unity's WebGL implementation is currently very inefficient, so those games really don't work for people with lower end hardware.
I've been told they are working hard on making things better, but at this point it's really hard to even recommend using Unity for web-based content at all, when there are so many other options available.
plz help me the keys w, a, s, d. dont work. this is a huge problem because it makes my player unable to move.
At 5/12/15 12:04 PM, PsychoGoldfish wrote:
Having problems with your Unity3D WebGL game? Please start here. If you've read through the wiki, searched Google, etc. and still haven't resolved your issue, feel free to ask a question here.
At 1/27/16 12:36 PM, JokingKitten119 wrote:At 5/12/15 12:04 PM, PsychoGoldfish wrote: Having problems with your Unity3D WebGL game? Please start here. If you've read through the wiki, searched Google, etc. and still haven't resolved your issue, feel free to ask a question here.
Can you do html on the iPad mini 1?
Hey there... where do i go to get help figuring out how to get newgrounds to run .SB2 files?
Hello there!
We made game in WEBGL in unity:
However we got this error while loading the game:
Uncaught SyntaxError: Unexpected token ILLEGAL blob:http%3A//uploads.ungrounded.net/a64b28e3-c43e-471a-affa-
Now I'm pretty much stuck, because I dont know what to do with this error
anyone got any idea?
At 3/8/16 10:32 AM, Railman85 wrote: Hello there!
We made game in WEBGL in unity:
http://www.newgrounds.com/projects/view/934397
However we got this error while loading the game:
Uncaught SyntaxError: Unexpected token ILLEGAL blob:http%3A//uploads.ungrounded.net/a64b28e3-c43e-471a-affa-
Now I'm pretty much stuck, because I dont know what to do with this error
anyone got any idea?
Are you uploading the compressed version of the game, or the uncompressed? I *THINK* that error is related to trying to decompress a file that's not compressed, or is double compressed.
At 3/8/16 10:49 AM, PsychoGoldfish wrote:At 3/8/16 10:32 AM, Railman85 wrote: Hello there!Are you uploading the compressed version of the game, or the uncompressed? I *THINK* that error is related to trying to decompress a file that's not compressed, or is double compressed.
We made game in WEBGL in unity:
http://www.newgrounds.com/projects/view/934397
However we got this error while loading the game:
Uncaught SyntaxError: Unexpected token ILLEGAL blob:http%3A//uploads.ungrounded.net/a64b28e3-c43e-471a-affa-
Now I'm pretty much stuck, because I dont know what to do with this error
anyone got any idea?
thank you for your answer.
Starting with Unity 5.3 unity WEBGL files are compressed now by default. (they dont put .htacces files anymore).
I just got files:
dogar.datagz
dogar.jsgz
dogar.memgz
UnityLoader.js
All compressed.
You are right, that sound like some problem with compression - got any hint what to do next/what to read?
At 3/8/16 03:22 PM, Railman85 wrote:At 3/8/16 10:49 AM, PsychoGoldfish wrote:thank you for your answer.At 3/8/16 10:32 AM, Railman85 wrote: Hello there!Are you uploading the compressed version of the game, or the uncompressed? I *THINK* that error is related to trying to decompress a file that's not compressed, or is double compressed.
We made game in WEBGL in unity:
http://www.newgrounds.com/projects/view/934397
However we got this error while loading the game:
Uncaught SyntaxError: Unexpected token ILLEGAL blob:http%3A//uploads.ungrounded.net/a64b28e3-c43e-471a-affa-
Now I'm pretty much stuck, because I dont know what to do with this error
anyone got any idea?
Starting with Unity 5.3 unity WEBGL files are compressed now by default. (they dont put .htacces files anymore).
I just got files:
dogar.datagz
dogar.jsgz
dogar.memgz
UnityLoader.js
All compressed.
You are right, that sound like some problem with compression - got any hint what to do next/what to read?
It should also make un-compressed files. Try using those instead. When you put them in a zip, they get compressed for upload, and our servers should be serving them automatically compressed (without needing a .htaccess file).
It should also make un-compressed files. Try using those instead. When you put them in a zip, they get compressed for upload, and our servers should be serving them automatically compressed (without needing a .htaccess file).
thank you for your help.
For those who have this problem:
You can simply unzip your:
dogar.datagz
dogar.jsgz
dogar.memgz
into
dogar.data
dogar.js
dogar.mem
and it will work like a charm :)
At 3/9/16 09:11 AM, Railman85 wrote:It should also make un-compressed files. Try using those instead. When you put them in a zip, they get compressed for upload, and our servers should be serving them automatically compressed (without needing a .htaccess file).thank you for your help.
For those who have this problem:
You can simply unzip your:
dogar.datagz
dogar.jsgz
dogar.memgz
into
dogar.data
dogar.js
dogar.mem
and it will work like a charm :)
Awesome, glad you got it working!
Just tested a mouse-based game with Unity 5.3 in WebGL and everything looks to be working pretty good.