Questions tagged [unity-webgl]
The unity-webgl tag has no summary.
47 questions
10
votes
3
answers
5k
views
Performance degrading when resolution increases for a 4k screen
I am new to Unity.
I have a problem where my game has good performance on my non-4k screen.
Bur when I play it on my 4k screen, the performance gets really bad.
It looks like the resolution is ...
5
votes
1
answer
10k
views
How can I use websockets in a Unity WebGL project?
There are plenty of good Websocket APIs for C#, but I run into trouble when targeting Unity WebGL due to this restriction described in the Unity documentation:
No direct socket access
Due to ...
5
votes
1
answer
7k
views
How to use AssetBundles with Unity WebGL
I have a Unity WebGL project that tries to load AssetBundles, but I get an error:
Unable to open archive file: http://localhost:50212/StreamingAssets/Bundles/language_english
The code that creates ...
3
votes
1
answer
115
views
Compiling Unity to WebGL gives a Node ESM module error
I'm trying to build my multiplayer game to WebGL in Unity (using Mirror). However, when I press "build", it gives me the following three errors:
...
2
votes
1
answer
2k
views
Build Unity from C# script
I'd like to build and package all the ports of my Unity game through a scripting system. Linux and Windows work fine through the Unity command line options, but there is none for WebGL.
For WebGL, ...
2
votes
1
answer
1k
views
How can I stop the Unity Video Player on WebGL from starting each video with a frame of all black?
Description
I'm working on a system to seamlessly reconstruct and play numerous segments of a continuous video stream by playing one segment on the active Video Player while loading the next on the ...
1
vote
1
answer
305
views
Is this code using Awaitable correct?
I am upgrading my code from coroutines to using async-await and Awaitables on Unity 6. I have the following code of a spawner:
...
1
vote
1
answer
634
views
When loading only one item from the asset bundle in Unity, does the whole asset bundle need to get downloaded?
I am deciding on how to package my asset bundles that will be loaded from the web server at some point in the game. Currently I am thinking of packing them by types: for example, I would have one ...
1
vote
1
answer
116
views
Character walks too fast when browser's hardware acceleration is turned off
I have posted a project on itch.io (here). My character walks with the speed I intended when Chrome's hardware acceleration is turned on but walks much faster when it is turned off. First, my friend ...
1
vote
1
answer
859
views
How do I share a downloadable WebGL build in Unity?
When I make a WebGL build for my project, I get a folder that lets me click a .html to play my game in a browser. Is there a way I can share a folder like this for playtesters?
I tried sending a .zip ...
1
vote
2
answers
123
views
Improving FPS by disabling unity events
I am trying to improve the fps and in my scene there are 4322 scripts attached to 4322 objects. When I activate those objects the fps go down. Right now it's around 100fps when i active those objects ...
1
vote
1
answer
2k
views
Create and serve AssetBundle at runtime
What I am developing is not a game, but is done in Unity3d, so I believe here is a good place to ask.
Context:
The unity application runs in the WebPlayer inside a web application
Case:
User uploads ...
1
vote
1
answer
6k
views
How to copy text from an InputField to the clipboard in WebGL?
I would like to know if there is a solution to copy/paste the text from/to an InputField in a WebGL Unity app.
For security reasons, Unity WebGL doesn't allow text copy and paste in/from browser.
1
vote
1
answer
251
views
How to copy text from my web game that I hosted on Itch.io?
I am having trouble copying specific text to the clipboard in a game I developed in Unity that I am hosting directly in the browser on Itch.io.
The code I implemented works perfectly in the editor and ...
1
vote
1
answer
5k
views
What color format, depth buffer should I use in a RenderTexture for WebGL screen output in Unity? Is NPOT ok? MipMaps?
Today I learned about a technique for forcing uniform resolution in a Unity WebGL build, as described here in the answer by DMGregory. Yay! I'm experimenting with implementing this technique on a ...