00:00
00:00
Newgrounds Background Image Theme

christopher54000 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Unity3d WebGL Support

60,367 Views | 123 Replies
New Topic Respond to this Topic

Response to Unity3d WebGL Support 2016-05-23 21:10:08


Having some trouble with resolution of window / assets. When i upload the file, all of my sprites are blurry and at a lower resolution than they should be. This does not happen in the editor, and neither does it happen when i make a normal .exe file and run it on my computer. I have changed the window resolution to 480x640 in the editor, and also in the player settings, but the issue is still present. Any ideas?

Response to Unity3d WebGL Support 2016-05-28 00:01:09


I'm attempting to get https://github.com/AdamRVierra/NewgroundsAPIUnity Newgrounds API working in my Unity 3d Web GL project. I haven't published my game yet, but I was testing it in the preview and I can't tell if my high scores/medals are working. Would they become unlocked in preview mode? Or do I need to publish the game before they start working?

Response to Unity3d WebGL Support 2016-05-28 23:19:56 (edited 2016-05-28 23:20:25)


I've managed to get a step further, but now I'm receiving this error (Attached image) when I send something SubmitScore/UnlockMedal it seems WebGL and the Newgrounds API for Unity are just not playing nicely. Here's the most related thing I could find: http://forum.unity3d.com/threads/webgl-error.317662/

At 5/28/16 12:01 AM, LunaWolfStudios wrote: I'm attempting to get https://github.com/AdamRVierra/NewgroundsAPIUnity Newgrounds API working in my Unity 3d Web GL project. I haven't published my game yet, but I was testing it in the preview and I can't tell if my high scores/medals are working. Would they become unlocked in preview mode? Or do I need to publish the game before they start working?

Unity3d WebGL Support

Response to Unity3d WebGL Support 2016-05-29 14:03:05


At 5/28/16 11:19 PM, LunaWolfStudios wrote: I've managed to get a step further, but now I'm receiving this error (Attached image) when I send something SubmitScore/UnlockMedal it seems WebGL and the Newgrounds API for Unity are just not playing nicely. Here's the most related thing I could find: http://forum.unity3d.com/threads/webgl-error.317662/

At 5/28/16 12:01 AM, LunaWolfStudios wrote: I'm attempting to get https://github.com/AdamRVierra/NewgroundsAPIUnity Newgrounds API working in my Unity 3d Web GL project. I haven't published my game yet, but I was testing it in the preview and I can't tell if my high scores/medals are working. Would they become unlocked in preview mode? Or do I need to publish the game before they start working?

If you're interested, there's an OFFICIAL Newgrounds beta client for Unity. It's not the best implementation (I have no idea how people package things for Unity yet), but it should get the job done.

If you're interested check out http://www.newgrounds.io

Response to Unity3d WebGL Support 2016-05-29 14:55:38


At 5/29/16 02:03 PM, PsychoGoldfish wrote: If you're interested, there's an OFFICIAL Newgrounds beta client for Unity. It's not the best implementation (I have no idea how people package things for Unity yet), but it should get the job done.

If you're interested check out http://www.newgrounds.io

How long ago did this start? I've been waiting for Newgrounds to allow your API in Unity projects. This is super cool.

Do you guys think you will ever allow some form of Newground ads for Unity? My apologies if it is already in this beta API I haven't opened it yet.

Response to Unity3d WebGL Support 2016-05-31 14:00:46 (edited 2016-05-31 14:01:50)


At 5/29/16 02:55 PM, HeroPower wrote:
At 5/29/16 02:03 PM, PsychoGoldfish wrote: If you're interested, there's an OFFICIAL Newgrounds beta client for Unity. It's not the best implementation (I have no idea how people package things for Unity yet), but it should get the job done.

If you're interested check out http://www.newgrounds.io
How long ago did this start? I've been waiting for Newgrounds to allow your API in Unity projects. This is super cool.

I started on the new version late last year, and have had a really rough Unity library for quite some time now, but haven't had anyone test it out yet.

Do you guys think you will ever allow some form of Newground ads for Unity? My apologies if it is already in this beta API I haven't opened it yet.

We're actually not going to be including ads in this API at all. The older Flash API didn't work for several users because ad-blockers would block the entire API domain.

We've been looking at other options, such as a possible standalone advertising API, or a new revenue sharing setup for our portals, but web-based advertising is becoming less and less viable in general and may not be worth the time we'd have to invest to support it all. It really depends on finding the right advertising partner.

Response to Unity3d WebGL Support 2016-05-31 19:13:46


Wow this is awesome! I will take a look thank you! And this support Unity WebGL on NG?

At 5/29/16 02:03 PM, PsychoGoldfish wrote: If you're interested check out http://www.newgrounds.io

Response to Unity3d WebGL Support 2016-05-31 20:07:52


At 5/29/16 02:03 PM, PsychoGoldfish wrote: If you're interested check out http://www.newgrounds.io

So I've begun implementing this and its pretty straight forward! Only thing is you may want to make the core not destroy on load. Also, using a tag to find the core would be easier and more dependable then having players drag the core object into the core variable.

I am a little confused as to the 'medal ids' and 'score ids' in the NG portal they are strings, but you are asking for integers. I assume if I have 3 medals they are id's 1, 2 and 3? Or are they 0, 1, and 2?

Thanks so much with this! It's really nice work.

Response to Unity3d WebGL Support 2016-06-01 13:06:49


At 5/31/16 08:07 PM, LunaWolfStudios wrote:
At 5/29/16 02:03 PM, PsychoGoldfish wrote: If you're interested check out http://www.newgrounds.io
So I've begun implementing this and its pretty straight forward! Only thing is you may want to make the core not destroy on load. Also, using a tag to find the core would be easier and more dependable then having players drag the core object into the core variable.

Yeah, I'm not really a unity guy (this was the ONLY thing I have ever used it for). I have no idea how to best implement this. I wanted the core to be a standalone class you could just set statically somewhere, but I couldn't figure out how to get access to the game loop (for checking user sessions automatically) without extending MonoBehavior, and couldn't find any standalone timers that worked in Unity.

If any of you guys want to take a look at it and let me know if there's a better way of packaging/implementing this, I would definitely appreciate the help.


I am a little confused as to the 'medal ids' and 'score ids' in the NG portal they are strings, but you are asking for integers. I assume if I have 3 medals they are id's 1, 2 and 3? Or are they 0, 1, and 2?

Every medal on NG has a unique id. If you use the Medal.getList component, you'll get all that info in the return. In fact, I'm 99% sure I put an unlock() method on the medal objects that returns, so you could just use that too.


Thanks so much with this! It's really nice work.

Response to Unity3d WebGL Support 2016-06-08 10:45:04


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.

It seems that the WebGL build is glitching my particals in unity. It makes my first partical all streched out and the second partical does play the animation sheet correctly. In the stand alone build its just fine so it has something to do with the WebGL build. Are there any WebGL overrides I can do to stop this?

Response to Unity3d WebGL Support 2016-06-09 11:16:24


Hi guys, have any of you found out exactly how to decompress the Released files from gz? I've heard of using 7zip but I'm using a Mac and renaming the extension doesn't work; gunzip in Terminal doesn't work.


BBS Signature

Response to Unity3d WebGL Support 2016-06-09 11:21:40 (edited 2016-06-09 11:33:16)


Oh wait.. You can get uncompressed Release files by doing a development build. But then there would be additional memory taking functions.


BBS Signature

Response to Unity3d WebGL Support 2016-08-17 02:58:15


At 3/9/16 10:21 AM, PsychoGoldfish wrote:
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!

I'm testing out a build, and I'm getting this error:
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
NotFoundError: The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.

Also. I'm confused how you're changing the release files.

Response to Unity3d WebGL Support 2016-08-18 02:46:57


So I figured out how to uncompress the release files, I didn't realize they were like zip files. I feel dumb.

Anyways, I still get the same error on firefox, but now it works perfectly in chrome.

I feel I've reached an impasse...

Response to Unity3d WebGL Support 2016-08-26 21:24:44


I've been trying to upload a WebGL game for a few days now with no luck.

I keep getting these error messages:

You need a browser which supports WebGL to run this content. Try installing Firefox.

(The game worked previously but now it doesn't)

If I add the Unity3D plugin I get this:

Unity3d WebGL Support

Response to Unity3d WebGL Support 2016-09-22 03:26:33


Wow, newgrounds.io is crazy cool! I wish I would have known about it before deciding my most recent game was finished, haha!

Response to Unity3d WebGL Support 2016-09-24 11:00:37


I have a problem. I downloaded the repository for Unity's WebGL at https://bitbucket.org/newgrounds/newgrounds.io-for-unity-c/downloads?tab=downloads to my Mac. It downloaded as a folder instead of as a compressed file, so I used my Mac's Finder to move the three folders inside the "Assets" folder named "io," "Plugins," and "SimpleJSON," into my Unity project. However, when I open the project, the folders and their contents are no where to be found in the project. I also tried to Import New Asset and Import Custom Package, but Unity does not recognize the downloaded folders as importable. Could this be because the repository is designed for Windows and not for Mac? Any suggestions? Thanks.

Response to Unity3d WebGL Support 2017-02-23 18:33:30


Hello there. I have been trying to upload my Unity game to newgrounds, but since chrome no longer supports webplayer, I've been using webGL. However, when I go to preview my game, I always get a memory error. If I set my memory in player settings below 1000, i get a message saying that chrome ran out of memory. When I set it above 1000, I get a weird error saying something about an "invalid array error". How do I fix this? What should I set the memory value to?

Response to Unity3d WebGL Support 2017-02-24 12:55:15 (edited 2017-02-24 12:56:12)


At 3/9/16 10:21 AM, PsychoGoldfish wrote:
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!

yes i did this too and it work but the loading time is x10 slower than befor did you find any idea to reduce the size of loading ?

Response to Unity3d WebGL Support 2017-04-02 04:11:58


My game runs perfectly fine on 1024*576 but for some reason my UI seems to scale up when running on 640*360. When I run it on my editor with a 640*360 resolution it shows everything properly. I am using unity UI . Any idea why this might be happening ?

Response to Unity3d WebGL Support 2017-04-23 09:21:23


Are they ever going to fix Keyboard input either not being read or sticking after release? And WebGL seems to love randomly omitting a script or 2 just to cause a headache for me.

At this rate it seems best practice is make mouse controlled games and pray nothing goes wrong in the build or you have a horrible time

Response to Unity3d WebGL Support 2017-04-29 19:45:48 (edited 2017-04-29 19:46:34)


So I finally found a solution to the NotFoundError
An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was:
NotFoundError: The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.

So after doing some more digging on google, it turns out the error resided in my local storage folders.

So I went to (user)\AppData\Roaming\Mozilla\Firefox\Profiles\(profile)\storage\default

and I moved http+++uploads.ungrounded.net to my desktop, and it automatically recreates itself, and voila! I'm not getting that error anymore.

That's an ENORMOUS hurdle out of my way, I'm actually now motivated to continue developing 3D games for ng, now that I have this albatross off my neck!

Response to Unity3d WebGL Support 2017-09-16 23:16:55


An embedded page at Uploads.ungrounded.net says:

An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was Uncaught SecurityError: Blocked a frame with origin "http://uploads.ungrounded.net from accessing a cross-origin frame.

-------------------------------------------------

Uploaded files, thought everything was good but got this error when I previewed. Any idea how to fix this problem?

Unity3d WebGL Support

Response to Unity3d WebGL Support 2017-09-17 11:30:24


At 9/16/17 11:16 PM, JimGiant wrote: An embedded page at Uploads.ungrounded.net says:

An error occured running the Unity content on this page. See your browser's JavaScript console for more info. The error was Uncaught SecurityError: Blocked a frame with origin "http://uploads.ungrounded.net from accessing a cross-origin frame.

-------------------------------------------------

Uploaded files, thought everything was good but got this error when I previewed. Any idea how to fix this problem?

So yeah turns out if you go in to the index.html and delete the header section everything is peachy. Hopefully this helps someone else out.

Response to Unity3d WebGL Support 2017-11-24 22:31:07


Hello!

I did a basic guide on how to setup the Unity API for the first time. Nothing official here just a 'rookie-made' guide, hope it helps anyone out there with their first steps.

https://www.newgrounds.com/dump/item/2bf305cd7060b61aa20df673e0718069

Response to Unity3d WebGL Support 2018-03-28 05:25:15


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.

i have made a post here about my recent game build :/ please help! https://www.newgrounds.com/bbs/topic/1430847

Response to Unity3d WebGL Support 2018-04-06 05:29:49


Hi Im new at all the game dev stuff and when I uploaded my game, everything worked great except the ground didn't render (It was there in the physical sense it just didn't render

Response to Unity3d WebGL Support 2018-05-02 07:49:35


The NG Wiki has virtually NO help for users who want to run the games Newgrounds hosts.

It's bad enough diagnosing problems when there's no tag to show what kind of file is being loaded, or even how big the file is (which can help devs and members alike).

But in the interests of doing SOMETHING, I've discovered a possible quick fix for FF Quantum 59.0.2 64-bit:
Type with no quotes or spaces: " about:config " in an empty address field.
This will bring up a void warranty warning screen, click to proceed. Type " WebGL " in the search field...
" pdfjs.enableWebGL ", set this to true, by double clicking the field.

No idea why this managed to kick start a few different files like Flash and HTML5 into working, but I report it here in the interests of all concerned and looking for help.


Vault 101 I have many old and deleted Flash submissions, PM me the filename, maybe I got it.

BBS Signature

Response to Unity3d WebGL Support 2018-05-14 04:54:27


Hey, have any of you modified the unity builds, so that the game doesn't load right away? As far as I understand with the new Chrome policy, if you launch audio right at page load, it gets blocked. Something like that. In itch.io this can be avoided by checking the checkbox where the game doesn't load on page load and needs to wait for user to click start game. I'm sure something similar can be achieved by editing the unity builds index.html. But since I'm not a html/javascript dev, I still didn't get the time to read up on this. So have any of you tried to solve this problem?

Response to Unity3d WebGL Support 2018-11-14 23:24:26


When I build my unity game for WebGL I get files that are different then the instructions. I get:

- ShooterGame.asm.code.unityweb
- ShooterGame.asm.framework.unityweb
- ShooterGame.asm.memory.unityweb
- ShooterGame.data.unityweb
- ShooterGame.json
- UnityLoader

When I try to run it on newgrounds I get this error.
"An error occured running the Unity content on this page. See your browser JavaScript console for more info. The error was: SyntaxError: missing ) in parenthetical"
SyntaxError: missing ) in parenthetical

What am I suppose to do?