So, I made the most feeble dots based game, compiled it up, but, it claims out of memory, surprising considering how small and feeble it is, however, the memory settings are no longer in the webgl player settings menu. So it not entirely helpful of it to tell me to go change it in the webgl player settings.
So, what can I do? seriously? its tiny… the publishable build is… 8mb
Add the Emscrypten Settings build component into your build configuration asset and pass the argument “-s TOTAL_MEMORY=512MB” (without quotes, adjust the memory size as you wish)
Hi Thanks, Ive not heard of the Emscrypten Settings build component nor would I be entirely sure how to add it to the build configuration asset - Ive edited assets in text form before, but having no familiarity I wouldnt know how to add it
Sorry, I thought you were able to do that. All dots based project should be compiled with the Build Configurations file, there you can add build components and edit the necessary settings. If you don’t know what I am talking about, take a look at the Unity samples.
@brunocoimbra I get the impression you dont know. Ive seen the unity samples, but I hadnt seen any that are designed for webgl build, in fact most dots stuff is usually demonstrated from the editor only, it also doesnt sound normal to add a component to the build asset as the build asset is usually controlled by the unity editor and its not like we get to just drag/drop items on it.
Well, other than a mention in the unity docs that the class exists there doesnt seem to be any documentation or mentions anywhere that google could find, having not looked into project tiny, its therefore not surprising I hadnt seen this, and of course this doesnt really explain how to use it only that it can be… Looking at the project tiny docs it seems this is currently specific to project tiny… which Im not using, but that doesnt really explain anything only that its there.
However, it does seem similar to the contents of some of the projectsettings.asset in the projectsettings folder. I had a look at the configuration assets and yes, it does seem useful however, it needed a “pipeline that derived from IBuildPiplineComponent” and… I didnt see anything that sounded like that in the folder you listed…
If this is likely to be a new way to go, it would be useful to have some documentation on how to take a non project tiny, and not preexistingly setup project into this. As, Im using webgl, not projecttiny - maybe I should be, maybe that would help but as I understand UI is still not supported that does put a bit of a drag to it.
But, as far as I know, there is not a build component to adjust WebGL memory size in non-tiny projects. Not sure if it would work, but you could create a build component yourself to set that.
Well, the line “webGLEmscriptenArgs” in the projectsettings asset, took the command and I think to an extent did use it, but its still complaining… the game is the crappiest thing, its a tower defense with at most (currently) like 30 entities on the go… it has 3 real simple systems (move, die because of health and shoot nearest thing) TBH I submitted a bug to unity because I think the memory issue actually comes from a bug, if you try play it it throws a trying to run loop error and says to log bug with unity but it does it quietly in the browser console so I think its throwing itself into some kinda stack overflow type barf…
shame because while dots isnt “live” yet while its fun making it in the editor I do feel it isnt real until your mates have poked at it at least.
I’m having the same issue. I’m just using the Unity 2D Game Kit project and publishing to WebGL… what a nightmare! First the thing never finishes loading and had to research that online … .then I fix that and now the WebGL memory error and Unity has gone and removed the ability to change that in Player Setting in 2020.3 (the version I’m using). I’m trying to upload to a Learning Management System LMS and if I modify the loader.js file and manually increase the memory I get an error message. I need to be able to change the memory amount in the Player Settings, but now Unity has removed that option? WTF??? Unity is killing me with this WebGL publishing option… they need to simplify the process. And considering this is their example on their LEARN site it’s quite an embarrassment that it doesn’t work.
I wonder if Unity care about WegGL at all, I am wasting so much time trying to make this work that it would probably be a lot faster to go for Three.js or something “native”, completely opposite of what Unity claims to do for developers. I love to work in Unity on other platforms, but what a complete nightmare Unity is to develop in when it comes to WebGL! and it is soooo slooow when compiling!!