#🌐┃web

1 messages · Page 9 of 1

merry chasm
#

I got curious about this subject and researched it around, it seems like the best practice is to provide a mouse pointer resolution scaler in your game's configuration menu. Basically you should create a JS script file in your Assets\Plugins folder so that you can detect that the player is effectively using Safari web browser. And then you do apply that resolution scaler to the mouse input.

The JavaScript - Name it: BrowserUtils.jslib

mergeInto(LibraryManager.library, {
  IsSafariBrowser: function () {
    var ua = navigator.userAgent.toLowerCase();
    // Chrome and Edge also have "safari" in their UA string, so we must exclude them.
    if (ua.indexOf('safari') != -1) {
      if (ua.indexOf('chrome') > -1) {
        return false; // It's Chrome or Edge
      } else {
        return true; // It's likely genuine Safari
      }
    }
    return false;
  }
});```


The Helper - This will interface with the Java Script plugin described above (so that you can have cleaner code in your actual game code later) Name it as the name of the class: WebGLInputManager.cs 

```cs
using UnityEngine;
using System.Runtime.InteropServices;

public class WebGLInputManager : MonoBehaviour
{
    // Common multiplier found by the community for Safari vs Chrome
    // You may need to tune this between 2.0f and 4.0f depending on the specific feel.
    private const float SAFARI_SENSITIVITY_MULTIPLIER = 2.5f; 

    public static float MouseSensitivityMultiplier { get; private set; } = 1.0f;

    [DllImport("__Internal")]
    private static extern bool IsSafariBrowser();

    void Awake()
    {
        // Default to 1.0 (no change)
        MouseSensitivityMultiplier = 1.0f;

        #if UNITY_WEBGL && !UNITY_EDITOR
            if (IsSafariBrowser())
            {
                Debug.Log("Safari detected: Applying sensitivity correction.");
                MouseSensitivityMultiplier = SAFARI_SENSITIVITY_MULTIPLIER;
            }
        #endif
    }
}
torpid valley
#

yeah more or less what i ended up doing was just detecting safari and branching on it

#

in my case its working well but i only have 1 machine to test so tomorrow i am going to see if there is much difference in the ideal value between different machines and macos versions

merry chasm
#

And finally pull it via your Update: 

void Update()
{
    float mouseX = Input.GetAxis("Mouse X") * WebGLInputManager.MouseSensitivityMultiplier;
    float mouseY = Input.GetAxis("Mouse Y") * WebGLInputManager.MouseSensitivityMultiplier;
    
    // Process rotation...
}```
merry chasm
#

This is AI help of course... You got me curious since I'm currently crafting my own game as well and having that audience out of the equation is definitely something not cool. Now I'm aware of this as well 🙂

#

@torpid valley - I would be interested in learning how this goes for you of course! If you can report back your findings?!

torpid valley
#

yeah will do, have a few other odd thigns with input to sort first though

merry chasm
#

Alright then! Best.

sinful locust
#

Hi, I'm having trouble with webgl on itch.io. The textures aren't loading properly, as well as the overall game looking lower quality. https://imgur.com/a/nw7xNo2 The water is supposed to be blue, but it is gray and i also attached some settings. Any help would be appreciated

outer rampart
merry chasm
#

@sinful locust Then as a side note, remember that WebGL does not have support for Compute Shaders so if you attempt one, it will fail. In the case that you are, now we do have an option although is pretty much in Beta and that is to attempt to make your build to be WebGPU targeted instead of WebGL to gain support for Compute Shaders. I'm unaware of how much of it is supported tough.

lost cedar
#

Hi!
unity analytics is messing with my service worker on my PWA app.
Im getting this error
Uncaught (in promise) TypeError: Failed to execute 'put' on 'Cache': Request method 'POST' is unsupported

Is there any way to work around this?
Maybe delaying the start of analytics? Any way of doing that?

Would be so grateful if somebody could guide me here, i have no idea about wed developing and i'm losing my mind with this. It prevents the sw updating the app :_D

charred briar
merry chasm
# lost cedar Hi! unity analytics is messing with my service worker on my PWA app. Im getting ...

From the bit that I researched about, it seems that error is likely cause by code that is trying to 'cache' aggressively all type of requests even if they are non Get type requests. Like 'POST's, those should not be attempted to cache. If this happens, apparently this would bound to happen inside the sw.js source file that is used to produce the WebGL build. Note that this is all hypothetical, like just more of an overall possible direction of the type of error.

Apparently the offending JS code should look something similar to this:


self.addEventListener('fetch', function(event) {
// This blindly tries to cache EVERYTHING, including POSTs
event.respondWith(
 caches.open('my-game-cache').then(function(cache) {
   return cache.match(event.request).then(function(response) {
     return response || fetch(event.request).then(function(response) {
       // ERROR HAPPENS HERE
       cache.put(event.request, response.clone());   <---
       return response;
     });
   });
 })
);
}); ```

While the correct type of code would read - If not a GET do not attempt to cache it: 

```js
if (event.request.method !== 'GET') {
 // If it's a POST/PUT/DELETE, just do the network request 
 // and do NOT try to cache it.
 return;
}```

But maybe this is too deep stuff  😅
uneven cairn
#

Hi! 👋
I have a question related to Unity WebGL, Next.js, and Auth.js, but I’m not sure which channel is the right one to post it in.

I’m trying to figure out how to link an anonymous token generated in Next.js with a Google account (Auth.js) for a Unity WebGL game. I’ve already opened a topic here:
https://discussions.unity.com/t/how-to-link-an-anonymous-token-generated-in-next-js-with-a-google-account-auth-js-for-a-unity-webgl-game/1698530

Could someone please tell me where I should post this question on the Discord to get the best help?
Thank you so much 🙏

arctic rose
#

Here. But it's not really related to Unity, you can just research how it's usually done in web apps in general

charred briar
#

It sometimes helps to think or Unity as the "chart" in this situation, and the front end as the "data" or holder of truth.

#

Imho

uneven cairn
arctic rose
#

In the Discussions post you said that you're not using Unity Authentication

uneven cairn
#

I didn’t explain it well, sorry. Basically, when a user arrives on my app, Unity creates an anonymous token. Later in the app, we ask the user if they want to log in with their Google account, and I’m looking for a way to link their anonymous account with their Google account. But nothing works. So I was wondering if there’s a better way to handle this with the anonymous token.

arctic rose
#

So are you using Unity Authentication or not?

uneven cairn
#

Yes 👍

arctic rose
#

Ok then #1390346533127458889 might be a better place. You might want to edit the forum post too to clarify it

wet pawn
#

We recently published a web version of our game, we got a report from one user who loads the game without any issue at first but when going to the ingame menu scene just gets a white screen.

In the log there's alot of these errors:
WebGL: INVALID_ENUM: invalidateFramebuffer: invalid attachment

And then some shader compilation erros:
circuit-racing.html?czyExpWeb2App=enabled&czyGamepageswitcher_20251209=ineligible&isNewUser=false&v=1.346:1 Shader Hidden/Universal/CoreBlit: GLSL compilation failed, no infolog provided

This only happens on chrome, the game works fine on firefox for them

valid solstice
#

I am facing an issue in a Unity WebGL project where a black frame appears at the start of a WebM video, even though the original video file does not contain any black frame (verified in video editing software).

Below are the exact steps, settings, and code I’m using.

Video File Setup
Video files are hosted on GitHub
Export settings:
Format: .webm
Video Codec: VP8
Audio Codec: Vorbis
Alpha Channel: Enabled (transparent background)

Unity Scene Setup
A Quad is used for displaying the video
VideoPlayer component is added to the Quad
VideoPlayer renders directly to the Quad’s material (via Render Texture)

Render Texture Settings
I am using a Custom Render Texture with the following configuration:
Dimension: 2D
Size: 960 × 540
Anti-aliasing: None
Enable Compatible Format: Enabled
Color Format: R8G8B8A8_UNORM
Depth Stencil Format: None
Mipmap: Disabled
Dynamic Scaling: Disabled
Random Write: Disabled
Texture Settings
Wrap Mode: Clamp
Filter Mode: Bilinear
Aniso Level: 0

Why does Unity WebGL show a black frame at the start of WebM video playback?
What is the recommended way to completely eliminate the initial black frame in WebGL?
Any guidance, best practices, or engine-level workarounds would be greatly appreciated.

whole carbon
#
#

Starting with "url9181.unity3d.com", how does that look legit to anyone? Your official sites are all unity.com not unity3d.com even if google says it was legit some point, maybe other point it seizes to be without us knowing. What about the beginning of the address? I do know emails sometimes tend to map some certain info about the clicker too but that is quite heavy amount of metadata.

arctic rose
subtle hamlet
pulsar marten
#

!cs

haughty vineBOT
wet grail
shell jasper
#

Does anyone know how to set up a PWA WebGL build to render behind the iPhone notch?

bronze laurel
#

Does anyone know how to disable both the web-caching and download prompt for mobile webGL?

tight gate
#

i cant publish this game . i've already downloaded the module .. how do i fix this?

idle locust
tight gate
#

when i trying to open the web in build profiles it shows this message .

#

but i've already installed it .. do i need other modules to publish a game in web?

idle locust
#

have you restarted unity yet?

tight gate
#

tried twice

idle locust
#

you only have the one install of that version, right? as in, you haven't downloaded extra editors from the archive or whatnot

#

to my knowledge you should only need that one module

tight gate
orchid bridge
#

anyone find any major performance boost with WebGL in Unity v6.3 LTS?

#

I take it WebGPU is still experimental right and still not performing as well or better than WebGL yet? 🤔

zinc hawk
#

Hello I tried to do a web build for a test project I have that is using Photon Voice 2 but the build fails with undefined symbols "egpv_opus" (a bunch). Is Photon Voice 2 not supported on web builds? I've searched online but can't find a solution.

outer rampart
outer rampart
#

Maybe browser support is better now

orchid bridge
torn willow
#

I'm getting sound distortion with some sound effects in my game when building for webpl but runs fine in editor, how do I fix this??

indigo saffron
graceful helm
#

does unity_RendererUserValue work in webgpu?

sharp sky
#

Hey, I have an issue with my beginner project. I published it on itch.io in browser but the game plays extremely slow. It's like the speed of all the moving parts was suddenly cut by 10... I have no idea why.

arctic rose
#

You haven't made it framerate-independent. You can test it by capping the editor framerate and seeing if it does the same there

sharp sky
#

Right, I have this : rb.AddRelativeForce(playerDirection * PlayerSpeed, ForceMode.Acceleration);

#

I should multiply by time delta time right ?

#

The issue I have by doing that is I need to have the player speed at like 2000

arctic rose
#

No, forces shouldn't be multiplied by deltatime. But they should be applied in FixedUpdate, if you have it in Update then that explains it

sharp sky
#

I'll try that

#

It worked thanks Niktu.

Now I have another issue : the VFX don't play 😭

#

Apparently the new particle effect system wouldn't play well on browser ? Or something like that ?

normal sequoia
#

Hello, I've been struggling to solve this error when trying to run WebGL with Brotli.

TypeError: Cannot read properties of undefined (reading 'buffer')

It happens at the beginning of loading the unity instance, but it keeps loading and successfully loaded the whole data but the game is not running. I'm using bun and typescript to handle headers to be able to load brotli files, also using WebAssembly 2023. I also tried Build and Run in unity but the outcome is the same Error. How to solve this issue?

arctic rose
#

Seems to be a Brave browser? Have you tried it with any other browsers?

normal sequoia
#

Hmmm... Let me try Firefox

arctic rose
#

WebGL is unfortunately targeted mainly for Chrome

normal sequoia
#

I tried Firefox, Edge, and Chrome, the Error is still the same

#

At some point the WASM build takes me around an hour to build. However, for Development Build it runs smoothly with no issue.

faint jasper
#

I have a question about memory profiler for Web builds. It shows that shaders take almost 1 GB of memory and textures take about 85 MB of memory, while when I take a snapshot in unity it is the other way around. Is it possible that in WebBuild, textures are a part of shaders?

radiant canyon
#

Hello everyone, i have this issue with WebGl builds, 3d elements aren’t rendering while ui 2d elements are finee, what could be the issue ?

sleek schooner
#

You guys, what is the state of WebGPU with unity nowadays? I kinda want to learn it and considered learning three.js or babylon.js but doing it with unity seems appealing as I already know unity?

I know unity bloats it, though

outer rampart
outer rampart
outer rampart
sage vortex
#

Hi is there no universal cross platform compressed texture format for webgl? It seems DXT is default but this may get uncompressed on mobile which does not support

#

Although the docs are a bit vague it seems best to do 2 builds, one DXT for desktop, one ATSC for mobile which is a bit of a pain

buoyant imp
#

hi, can someone give me a tutorial for web dummies for Unity Accelerator?

#

I have zero idea about how to set it up to make it work

#

in the most simple way

outer rampart
buoyant imp
#

well, I installed it, but I don't know how to setup IP and ports to make it work

#

I also tried to set inbound and outbound rules to the firewall for the ports

outer rampart
#

On what did you host it?
And which specific step did you get stuck on? Can you link it in the docs?

outer rampart
buoyant imp
#

what do we mean by hosting? I installed it onto the PC we use for building

#

so its a server

#

dashboard did work

#

although I wanted to test some setting changes, and it said to restart agent

#

but when I restarted the service, the dashboard never appeared again

outer rampart
#

Then make sure it's started again and then check for logs

#

If you installed via docker check the docker logs. Not sure about the other installer

buoyant imp
#

nope, I have no idea what the docker is

#

I just heard the name one or twice

#

it was just a regular installation

buoyant imp
#

@outer rampart also the firewall rules used for Unity Accelerator blocked other services we use

outer rampart
jaunty raptor
#

I got a question , i dont know if this is not the right channel to ask this in , sorry if its not. So i have to do a game for a school competition the problem is that it has to run in browser, i downloaded the unity web support , the question is do i need to consider more the way that i program the game like can there be performance issues just because it runs into the browser?

#

it is to mention i've never done this before

wet grail
plain shard
#

the question is do i need to consider more the way that i program the game like can there be performance issues
it really depends on what game you are trying to make

woven valley
#

Does anyone know if the webgl buil;d will work with html5?

#

Or the steps to even try this?

arctic rose
#

The question doesn't make sense. Explain what you mean

solemn spade
#

Hey, I'm trying to build a game for web and it works fine on Itch but just a black screen on GitHub pages

arctic rose
#

Open the browser's Javascript console and see if there are errors

gaunt plinth
#

heya people.
I'm working on a little thing using Unity, and I need to be able to select a file.
because my primary target is web, I need it to work on web.
so my question is: is there any native feature to show file dialogs?
if not, anyone knows some (free) library that implements it and supports web builds?
worst case I can use the javascript interop features but I would prefer to avoid doing that if there are existing options

#

and before you ask, I did search the asset store, and found a couple options, but I cannot look at them currently.

#

ah the site is back

#

NOTE: Universal Windows Platform (UWP) and WebGL platforms aren't supported!

#

shame

wet grail
gaunt plinth
#

I didn't even consider using a native library

frank lynx
#

Please stop spamming this across the server. Thanks.

long pier
#

hey can somebody help me, so i made a mobile game and the resolution ist 1080x1920 but the problem is on the web it doesn´t fits :/

#

this is it

#

so basicly on the web no matter what resolution nothing really shows up or scales to the screen size

#

i mean its obviously because its a 1080x1920 so portrait game which is fine for mobile but hard to run on desktop

arctic rose
#

What kind of solution are you looking for? Setting the WebGL build to show in portrait or adapting the game to work in landscape?

long pier
#

so in landscape it would be weird

#

just the portrait game like on the phone, but on pc 👍

arctic rose
#

I don't think you can change the aspect ratio of the play window in Unity Play so the options are either building to 1080x1920 and publishing somewhere else like itch.io that doesn't force the aspect ratio, or adding letterboxing to the game so that the play area stays the same regardless of window size

arctic rose
#

Did you set the canvas resolution in player settings?

long pier
#

its a small window and perfect, but nothing scales down to it so i think its impossible

#

anyways thanks for helping

arctic rose
#

I mean Unity's player settings

long pier
# arctic rose I mean Unity's player settings

there it is 1080x1920 ( which works perfectly fine for mobile but like i said not for pc, because its scaled down to 360x640 on itch. io and the text and everything does not scale down )

arctic rose
#

and if the game is 1080x1920 then why not set it to that instead of 360x640

long pier
#

wait got it to work just scaled everything manually down

formal fog
#

What's the state of Unity for web games? Are they planning any improvements related to build size, performance, etc? Last time I tried it, I had a really hard time getting an empty project to be less than 10MB.

charred briar
formal fog
#

@charred briar Thanks, that's unfortunate. Was that 6MB an empty project or an actual game?

I can see that they have plans to improve the size and performance for web games in their roadmap. But I guess 6.7 is not gonna be released until the end of this year.

charred briar
# formal fog <@229302061840203786> Thanks, that's unfortunate. Was that 6MB an empty project ...

Game with dark magic and cheats. I actually just wrote off the remainder of the project for that client this morning.

To be fair, they didn't have fast loading as an initial requirement, but it was killing school access and i clawed it tooth and nail down to about 6mb. Still not good enough.

So finally just gave up, switch it to a bare bones phaser MvP and closed off the remainder of the project.

Im sure I could keep picking at it, but their budget was tiny. And no sense fighting it down any further...

#

Its super convenient as an engine, but sometimes aiming for everything means not quite getting it there.

#

And my ability or will to learn too I suppose

formal fog
#

Wow those are some strict requirements. Was their network so slow that they couldn't afford a 6MB download to each students computer? Or was it something else that made them unable to accept that size?

I understand that unity will never be the best engine for web games, but I really want to use an engine that has first party c# support and exports to the web. So far it seems like unity is the only reasonable one.

charred briar
#

Im just happy its over 😂

long pier
formal fog
formal fog
faint jasper
#

I have checked Web Burst on one of my test projects and it is amazing. Out of the box 50% performance increase. But I have one issue. Locally run build (localhost) runs OK. When I have posted the same to itch.io, it complains about a lack of browser multithreaded support. I have used the same browser as for the local build. What's up with that?

sweet oriole
long pier
long pier
formal fog
# long pier Also really nice that some people know defold, ik the Most don't know it or use ...

Yeah Defold is a really cool engine. The only thing I miss when using it is a typed language. But hopefully they'll get that soon.

Anyway, I just found out that the new Platform Toolkit that I was very interested in is a Pro feature. That's way out of my budget, so I'll move to another engine for now. Maybe I'll just go back to Defold. I was so hyped about Unity until I found out about that... 🙁

faint jasper
sweet oriole
#

The Web platform supports multithreading, when your document is within a secure context.
The following HTTP response headers must be set by the server.
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-origin
You can look into reasons why these things are the way they are at the moment. Unfortunately you can generally assume that you can't use multithreading when someone else is delivering the build as a part of their site. Again, I don't believe this should affect Burst though.

long pier
# formal fog Yeah Defold is a really cool engine. The only thing I miss when using it is a ty...

:/ sorry i can't say much Abt that, so i think unity is good, If you get used to it, and defold is also good, or maybe Godot? I think Godot is good for 2d Games and 3d in Future its in Beta, so atm i think the best is unity, tbh i didn't know Toolkit costs Money, but its actually very much, lol at First thought it was free, 900$ is crazy 😅 but its Always about what Kind of Game to make, so i Liked Godot very much, went to unity and My Main engine is unreal engine, i use unity only for simpler Games or 2d Games or Web Games, so its Always about what Kind of Game you wanna make

formal fog
#

Anyway, I'm not here to hate on Unity. It is what it is.

long pier
#

But tbh, unity pro is really good, but the Most Games you can do without it and i didn't know you Need pro to Export for consoles, all Crazy,

#

Also i used i think Gamemaker but that costs Money now, was also a good engine for 2d Games

formal fog
#

@long pier Godot has official C# support. But yeah GDScript is their own language, built for the engine, which looks pretty nice.

I haven't tried Game Maker, but it looks good. I was interested in it for a while when they announced official JavaScript support. But I'm not sure if that's implemented yet. Either way, I'd rather use an engine with the option to create 3D games too.

faint jasper
fringe garden
#

ok so the html5 version of my game got too big, is there any way to keep all my content but not have to worry about the 250mb standard size? like having extra stages it bgm being loaded/streamed elsewhere outside the project?

#

otherwise I gotta gut some game modes out into separate games...

charred briar
fringe garden
#

i'll look into it

halcyon gate
#

How can I paint now?

charred briar
severe vigil
#

Hi guys we're aiming for webgl
But is it safe to say that aiming for webgl first is a good strategy if we want to also deploy in mobile?
Graphics wise
Bcoz webgl don't even have gpu (yes i mean webgl not webgpu)

#

Or would u say the other way around?

#

And in terms of reach, would u say the same?
Something for webgl can potentially be played in mobile. But the other way around is not true

bright sigil
#

metal for ios have some nice transparency, depth features that I'm aware of

bold halo
#

Hey, I’m working with Unity WebGL and I want to change a TMP_Text from an HTML page without using UnityWebRequest.
Can anyone show me how to do this using only .jslib or JavaScript from the browser?
For example, I have an HTML input and button, and I want the text in Unity to update live.

arctic rose
#

Is the Unity game embedded on the same page as the HTML input?

bold halo
#

No, it’s on a separate page, I want to update Unity from another page.

arctic rose
#

Is it on the same domain?

bold halo
#

yes

arctic rose
#

You could have the HTML form set a value in localStorage for example and have the Unity game read it from there. It's a bit of a hack but cross-tab communication without a server sometimes needs that

verbal estuary
#

I'm having trouble with uploading my first game onto itch.io. For some reason when I uploaded all files in a zip format, I get this. On the second image, left is what comes out on itch.io, right is what is intended to show. Does anyone know what I did by accident while building my game? I also posted a picture of the build settings to show you what I have set it to. Thank you for anyone's information

#

I almost forgot. Here is also my itch.io settings

hardy panther
#

looks like you built your project around having 1440p, while your itch.io embed size might not be accurately replicating it

verbal estuary
#

So what's my solution?

hardy panther
#

check your canvas component, I forgot what the option is called, but there is a way to have your canvas automatically resize when the game window is a different size

#

also in the game window, there's a dropdown that lets you preview different resolutions

verbal estuary
#

Is that it?

hardy panther
#

pretty much? just try messing around with it, maybe check the documentation. My lunch break's over so I won't respond

verbal estuary
#

I will definitely try to play around

verbal estuary
#

I'm not sure why the paddle isn't showing up, or why the score text is bunched up

#

Is this still the right channel to talk about this?

#

The ball still shows up too in the itch.io upload

verbal estuary
#

It took a lot of tweaking, but I got it working

bold halo
#

Hi, I am working with webGl trying to change a text in unity from html and i created this is project structure : public/
├─ Build/
│ ├─ Build.data
│ ├─ Build.framework.js
│ ├─ Build.loader.js
│ └─ Build.wasm
├─ index1.html
└─ app.js mergeInto(LibraryManager.library, {
ChangeUnityText: function (strPtr) {
var str = UTF8ToString(strPtr);
SendMessage('TextObject', 'ChangeText', str);
}
}); using UnityEngine;
using TMPro;

public class TextManager : MonoBehaviour
{
public TMP_Text myText;

public void ChangeText(string newText)
{
    myText.text = newText;
}

} and there are two errors : Build.loader.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index1.html:1 Refused to execute script from 'http://127.0.0.1:5500/public/Build/Build.loader.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
app.js:8 Uncaught ReferenceError: createUnityInstance is not defined
at app.js:8:1

#

here is the app.js and index1.html scripts : <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Unity Text Control</title>
<style>
body { font-family: Arial; text-align:center; margin:20px; }
input { padding:5px; width:300px; font-size:16px; }
button { padding:5px 10px; font-size:16px; margin-left:10px; }
#unityContainer { width:800px; height:600px; margin-top:20px; border:1px solid #ccc; }
</style>
</head>
<body>
<h1>Change Unity Text</h1>
<input type="text" id="textInput" placeholder="Shkruaj tekstin këtu">
<button id="updateBtn" disabled>Update Text</button>

<div id="unityContainer"></div>

<!-- loader.js modern nga Unity Build -->
<script src="Build/Build.loader.js"></script>
<script src="app.js"></script>
</body>
</html>

#

app.js : const input = document.getElementById("textInput");
const btn = document.getElementById("updateBtn");
const container = document.getElementById("unityContainer");

let unityInstance = null;

// Ngarko Unity WebGL modern
createUnityInstance(container, {
dataUrl: "Build/Build.data",
frameworkUrl: "Build/Build.framework.js",
codeUrl: "Build/Build.wasm",
streamingAssetsUrl: "Build/StreamingAssets", // nëse ke
companyName: "Demo",
productName: "UnityTextDemo",
productVersion: "1.0",
}).then((instance) => {
unityInstance = instance;
btn.disabled = false; // Unity gati, aktivizo butonin
}).catch((err) => {
console.error(err);
});

// Kur klikohet butoni, dërgo tekstin tek GameObject në Unity
btn.addEventListener("click", () => {
const text = input.value;
if (unityInstance) {
// 'TextObject' = emri i GameObject që ka TextManager.cs
// 'ChangeText' = metoda në C# që ndryshon TMP_Text
unityInstance.SendMessage('TextObject', 'ChangeText', text);
}
});

arctic rose
#

!code

haughty vineBOT
arctic rose
#

Is this running on a local server you set up yourself or on Unity's build & run server?

bold halo
#

local server

arctic rose
#

You have to set it up so that it serves .js files with the correct mimetype

silver raft
#

haven't made a project for web in a while.
My game is finished and already on itchio with a windows build.
I'd also like it to be available to play directly in the web browser, but am I remembering correctly the switch platforms thing has extra steps?

#

I remember last time I did it all scripts were re-made for web, which is expected

#

but there isn't irreversible damage anywhere, is there?

sweet oriole
#

It will probably just work if you switch platform and change compression format to Gzip in Player settings -> Publishing settings

silver raft
#

in this order?

sweet oriole
#

Doesn't matter. Changing platforms and tweaking these settings shouldn't irreversibly damage your project.

#

It's possible you need to make rendering or script changes depending on the project, but vast majority of stuff will just work.

silver raft
sweet oriole
silver raft
sweet oriole
silver raft
#

is there a way to have the web build open on a separate tab in itch.io?

sweet oriole
silver raft
#

a friend tried opening the game in the browser and got this error

#

I once got a similar one

#

no errors on windows builds

#

what could the cause be?

sweet oriole
# silver raft what could the cause be?

I would check browser console for more info. Are you perhaps trying to go fullscreen without user interaction? I recommend paying close attention to what sort of requirements these sort of browser APIs have.

halcyon raven
#

guys why does WEB BUILD TAKE SO MUCH TIME

#

I CLICKED DISK SIZE WITH LTO AND AFTER 43 MINUTES IT SUDDENLY SAID CANCELLIN EVEN THOUGHT I CLICKED NOTHING

bright sigil
bright sigil
shut relic
#

Hey all,
Having some issues getting my build to work in Unity Play, after navigating the character creation screen, the game gets stuck between confirming and loading the scene.
In the macOS build, it works completely fine.
Would there be an easy way to troubleshoot this? Thanks

crystal epoch
#

Figured this might be a good place to ask since I couldn't find anything elsewhere. I was wondering if anyone knows of a list of examples (or just knows specific ones) of websites that use Unity Web build with interactive UI (actually utilising the ability for Unity app to use javascript functions and javascript to use Unity script functions). I tried searching for sites like that online but most potential ones that I could think of potentially using it (like car configurators or IKEA room designer, etc.) seemed to either use Three.js, PlayCanvas, some weird stuff with just (likely pre-rendered) images/videos, etc. Also I get that there are bunch of fullscreen (or functionally isolated) games that were built in Unity but I specifically was interested in ones combining standard html buttons and the webgl app.

visual siren
#

has anyone done any work on having a webgl build work with different texture compressions ? I'm wondering if I can somehow make ktx2 format work without completely changing the workflow in Unity itself.

torpid valley
light gazelle
#

I had some WebGL questions im not sure if here is the right place to ask.
I'm using itch.io for my specific build in question.

do WebGL builds have a limitation of storing using Application.persistentDataPath?
Are they prone to problems with clipboard copying?
Do they block web requests like to CloudFlare KV or servers like ones in Vercel?

shut lion
#

Hi,
I'm trying to build my project for web.
Using Unity 6.3 give me a working build but burst isn't enabled.
It seems I need to move to 6.4. But In 6.4 the WebGL build fails at runtime with an "Uncaught RuntimeError: memory access out of bounds" and the WebGPU just hangs with the unity logo and load bar full.
I've tried several combination, but none even load the default URP project scene.
Did anyone manage to build a working project with 6.4, WebGPU, Burst and Jobs ? (I aslo use entites but not entities.graphics)

lofty fossil
#

Is the 1mb limit just for playerprefs or for any filesystem technique.

lofty fossil
#

Nevermind

#

Found answer

quartz mulch
noble wyvern
# shut lion Hi, I'm trying to build my project for web. Using Unity 6.3 give me a working bu...

I'm having success with Bursted jobs in webGL. Using Unity 6000.4.3f1 - the funny part is, if we build using our in-house build machine, I get that exact same error after it finishes uploading to Itch.io. However, if I do the build manually myself (and upload manullay), everything works fine. Not using Entities, just SystemBase that loops over lists of MonoBehaviours, kicking off Jobs as needed. But we do have the Entities package installed. Sorry this isnt helpful, just one more data point. Did you ever figure it out?

shut lion
noble wyvern
#

Yes, Ive enabled the Native Multithreading option in order to get bursted jobs running

noble wyvern
#

@shut lion Correction! I was thinking of an earlier test project I had done (before my current project) - in that project I didnt have Entities installed, I was using VContainers update loop. In the current project, I do have Entities installed (for the SystemBase Playerloop), but I FORGOT to enable Native Multithreading, thinking everything was honky dory from the earlier project. Now that Ive enabled it, with Entities installed I get the following error in a fresh build ```Uncaught RuntimeError: memory access out of bounds
at ChunkDataUtility_GetComponentDataRW_mCAE8FE190228045A6727FA68C839C44E9FF8C27F (Debug.wasm:0x533e94f)
at EntityQueryImpl_GetSingletonRW_TisSingleton_t1651082D66AC0E8FDCC10F98F216B9BF100ED8C4_mA16A2E844863AF6713A01CBB73A74BB9BE9D3FA6_gshared (Debug.wasm:0x485374b)
at EntityQuery_GetSingletonRW_TisSingleton_t1651082D66AC0E8FDCC10F98F216B9BF100ED8C4_m07A3E111286ADABB0A0025B08FE6155D18748CA7_gshared (Debug.wasm:0x3475134)
at ECBExtensionMethods_RegisterSingleton_TisSingleton_t1651082D66AC0E8FDCC10F98F216B9BF100ED8C4_m02B84B36EBD57393ACF0570D688AEA47E6F55528_gshared (Debug.wasm:0x348e898)
at BeginVariableRateSimulationEntityCommandBufferSystem_OnCreate_mE007FF298A48960198B45E5CB21857E09F6DD767 (Debug.wasm:0x49ebee1)
at ComponentSystemBase_CreateInstance_m79F65A71BD533BB69AEA70980E414A9B49947B55 (Debug.wasm:0x5349e66)
at World_AddSystem_OnCreate_Internal_m52298962331E2236D3FC629EAB64974BB2CE14C4 (Debug.wasm:0x3f21ec1)
at World_GetOrCreateSystemsAndLogException_mAC5B30305ADE7068D0F4DA41FE93C3F944887399 (Debug.wasm:0x3f24d20)
at World_GetOrCreateSystemsAndLogException_m65330BDD5D6A373B21E2B969BF898BDF4B9848D0 (Debug.wasm:0x3f256a6)````

shut lion
#

Yes got the same thing, at least with one of the combination between burst, web assembly 2023, entities and job. The other possible results are it runs (but no burst and no multi threading), or it just hangs with the unity logo and load is complete.

noble wyvern
#

I have to go back and check my older test project, and see what the differences are, because I definitely saw jobs running on threads in the profiler on that project (janky as it was, getting profiling to work)

shut lion
#

The only way I had it work is if I use a custom bootstrap. The issue seems to be in the command buffers initialisation of ECS. Something is making the memory corrupted and crash explicitly or silently depending on what's enabled or not.

#

My bug report is in review so at least you having the same issue makes me more confident Unity will be able to reproduce.

noble wyvern
#

Oh that sounds good. I'm well into a project using SystemBase as my playerloop, I'd hate to have to strip it out now

noble wyvern
#

Does anyone know why Terrain looks absolutely awful in Web builds? Its like the shader is missing normals, or something? Ive already added the URP/Terrain/Lit shader to Always Included Shaders, but it makes no difference

(left = editor, right = webGL build)

#

Aha, looks like its using too many texture units, my artist must have gone a little overboard

copper light
#

Hey guys why does my game look like this on WebGL

its like pixelated

#

It should look like this:

copper light
#

hmm i dont know exactly what to change in my quality settings, it seems alright to me? what do u think

wet grail
copper light
#

Hold up I see that now, I'll try to change it and see what happens

#

Thanks bro it works

rocky garden
#

I've ever developed Unity 2D indie games.

vagrant atlas
sage vortex
#

Has Unity webgl stopped working on Firefox? Can't get it to run. Not than hardly anyone uses it anymore

#

shaders errors I think Failed to create D3D Shaders

#

not a special project - like a brand new URP one

sage vortex
#

it's Forward+ - is generally problematic on web

#

so then I have Forward with 9 lights per object :/

vestal salmon
sage vortex
noble wyvern
#

@shut lion Did you receive any updates on your bug report?

shut lion
#

No 🫠

noble wyvern
#

🙁

maiden ocean
#

Hello,
Is anyone know how to setup webGL for Unity Play?
I published my first game but it do not work on fullscreen. I see only black screen. I used settings for itch.
Thanks for help.

left merlin
#

I tried to switch from Old Input System to New Input System. The uncompressed WebGL build sizes jumped from 30 MB to 36 MB.
After some tinkering, I found out that New Input System requires UIElements. With the Old Input System, UIElements was disabled, with the New Input System it's forced Enabled.
Finally, I tried using the Old Input System and have UIElements enabled. This also increased the build size massively, so the issue is indeed in UIElements. Is there a way to fix this? I'm not even using UIElements, but I cannot disable it when I want to use the New Input System. Thanks!

sweet oriole
torn marten
#

@everyone I need Help, How to use smartphone keyboard to type something in an input field on Unity WebGL Builds ?

ashen violet
#

Does anyone know how I can make a webGL build of my game that has the view grow or shrink with the itch.io viewport? Basically, if its windowed in the website like this pciture, it fills up the whole viewport. If the user puts the game into full screen, the game takes up the whole screen, The second picture shows the the game is keeping its resolution and not growing with the actual viewport.

I have tried letting itch.io auto detect size for viewport. My canvas elements are all set to scale with the screen size and are screen space overlays. Not sure what I am missing here.

frozen sun
#

I'm trying to export my project as a WebGL, but it's not working, I keep getting errors
Also, don't ask questions, I'm too tired to deal with people saying "Are you sure you're allowed to do this?" YES I AM DAMMIT

rustic igloo
#

Not a pinned post

frank lynx
#

@fading blaze your request has been granted. 🙂

fading blaze
#

❤️❤️❤️

#

I think I never sent so many hearts in a Discord channel ever before

#

Brotli VS Gzip

Anyone has any demystifying point of view, advice, regarding these? Extended reading on the topic is welcome also. Tx

tired finch
high patrol
#

❤️❤️❤️ Thank you mods!! I think one of the topics in the spotlight right now is getting multithreading up and running for webgl. This will be a good resource for paving the way--I sense when it becomes available webgl builds will become the wild west of web development

#

Has anyone else played around with a typescript React frontend site using their React Unity component to embed a webgl build?

#

I've been able to put together one, but my eventual goal is to have a bunch of games on one site and to be able to switch back and forth. Basically how Itch is doing it

summer jacinth
#

For some reason when I build and start my game it gives me that error :
abort( both async and sync fetching of the wasm failed)

I already removed the compression as I know that can cause problems but that wasn't it.
even weirder is that Build and Run actually successfully starts my game but then trying from the same files with the index.html gives the error.
Idk where to look anymore

#

I've tried enabling decompression fallback

high patrol
#

how big a game is it?

summer jacinth
#

very small

#

1 scene

#

10 gameobjects or so

#

like 4 scripts

modern plank
#

Hey guys, I'm using Mirror Networking (similar to the old UNET framework). I'm trying to set up an FPS such that I have a server build running on a Microsoft EC2 instance and a WebGL client running on a Squarespace website with an insecure SSL certificate.

So far, I can connect to the server build when running the WebGL build locally, but when I try to connect from my website, I get "websockets failed to create secure connection".

I'm still in the middle of fiddling around & testing with the "ssl enabled" and "client uses wss" flags but what does this error mean and what is the correct way to set this up?

red igloo
#

Hello Guys
Looking for -good pipe- look dev.
My team and I, are working on a webGL PC version project.
I would like to know if it's a good way to force the render inside the wiewport of the projet to switch OpenGLEs, or can i leave it on DX11 ?

twilit widget
#

Hey all, so we're using a webgl build for some specific product features in our webapp. Our current build size is around 13MB for the core framework (using addressables for specific experiences), and gzip compression. Unfortunately our download/loading time is pretty gnarly which is understandable given the size.

I was just curious if anyone had any resources, articles, or experience optimizing the crap out of webgl load times

late jetty
#

Is there any way to create text in a webGL build that can be read via screenreader?

floral idol
jovial grotto
#

why does the unity upload thing give me a blue bar that only goes to 90 percent

sweet oriole
orchid bridge
#

have a problem when exporting to WebGL, everything works perfectly in the Unity engine, but when I export to WebGL everything seems to be fine except for one thing, the character does not move. I've already been looking everywhere that it could be but I can't find a solution. This is why I am here, does anyone have any recommendations?

sly brook
hardy verge
sly brook
hardy verge
sly brook
#

is it possible? or better to use an embed or iframe?

twilit widget
# sweet oriole There seems to be some major upgrades in the latest beta. Granted some might hav...

Thanks Danny! I had the same thought - unfortunately the beta breaks lots of aspects of the project but im sure we'll work through it so we can test properly. Interestingly I found this Repo of webgl loading time tests across a number of versions of unity: https://github.com/JohannesDeml/UnityWebGL-LoadingTest

I was surprised to see the beta underperforming considering the improvements theyve made.

sweet oriole
#

Built with Code Optimization: Size and IL2CPP Code Generation: Faster (smaller) builds
Ah, looks like that is covered

fading blaze
high patrol
#

You end up with a .NET backend built out with a React dependent front end (I like using typescript). The Unity component probably will use a store and have access to whatever it needs in there

hardy verge
#

U just have to manage canvas tag and script in your page

sly brook
#

i made it after all, using blob architecture with static embeding, thanks for the hint anyways. 😄

jovial grotto
#

i already hosted it on a localhost

solid comet
#

I need help with my Webgl for replit and i get this error SyntaxError: illegal character U+001FReferenceError: unityFramework is not defined

hardy verge
orchid bridge
fading blaze
#

What Unity version are you using?

lofty hedge
#

Hi everyone, I have a question about using c++ plugins in WebGL builds in the new Unity version.

So Unity 2021.2 switched to using the new version of emscripten, which is great. However I have a little problem. I used to provide emcc command line arguments by editing ProjectSettings.asset file, like this "webGLEmscriptenArgs: -std=c++17". But this doesn't seem to work in Unity 2021.2, it looks like this line is completely ignored now and emcc is launched with default settings. Does anybody know where I can provide emcc command line arguments in the new version?

dapper lantern
#

hi i just uploaded my game to webgl an posted it how do i update my game after words

#

plz eny won

frank lynx
#

Just overwrite the files.

pine current
#

Having a major issue on a client game project. Has any one else seen this issue where the build appears fine in the editor, fine on local webgl, but on webgl (itch.io) the textures formats are broken resulting in what looks like a low lighting situation however its not the lighitng, its the textures. The error is: invalid texture format: 28 (or sometimes 29) with no indication as to which texture file. Anything that uses a straight color material is fine its only materials that use textures. Any advice would be greatly appreciated! Happy to share settings and in game shots if that will help.

cloud cairn
#

Anyone had problems with webgl and the new input system compatibility? I just tried building my game for WebGL and it builds and "runs," but gets stuck at the end of the loading screen and there's a few exceptions in the developer tools about resolving parts of my input bindings.

pine current
#

This is a snippit from my log:

#
Unloading 1 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 471.3 MB.
System memory in use after: 406.8 MB.

Unloading 141 unused Assets to reduce memory usage. Loaded Objects now: 8237.
Total: 206.704600 ms (FindLiveObjects: 1.052000 ms CreateObjectMapping: 0.460900 ms MarkObjects: 183.388500 ms  DeleteObjects: 21.802600 ms)

Invalid texture format: 29
Invalid texture format: 29
Compiled shader 'Standard' in 2.31s
    gles (total internal programs: 1886, unique: 1472)
    gles3 (total internal programs: 2650, unique: 2236)
Compressed shader 'Standard' on gles from 10.06MB to 0.32MB
Compressed shader 'Standard' on gles3 from 19.58MB to 0.61MB
Compressed shader 'Ciconia Studio/CS_Standard/Builtin/Standard (Specular setup)/Opaque' on gles from 0.56MB to 0.03MB
Compressed shader 'Ciconia Studio/CS_Standard/Builtin/Standard (Specular setup)/Opaque' on gles3 from 1.04MB to 0.07MB
Compressed shader 'Hidden/VLB_BuiltIn_SinglePass' on gles from 2.87MB to 0.14MB
Compressed shader 'Hidden/VLB_BuiltIn_SinglePass' on gles3 from 3.32MB to 0.17MB
Script attached to 'CounterHandler' in scene '' is missing or no valid script is attached. 
(Filename: C:\buildslave\unity\build\Runtime/Mono/ManagedMonoBehaviourRef.cpp Line: 181)

Invalid texture format: 29
Invalid texture format: 29
Invalid texture format: 29
Invalid texture format: 29
Invalid texture format: 28
Invalid texture format: 28
Invalid texture format: 28
Invalid texture format: 28
Invalid texture format: 29
Invalid texture format: 29
Invalid texture format: 28
strange goblet
#

Tried to build my game for webgl and got these, anyone know a solution?

vestal spoke
#

Hello guys. When i build my game for webgl version, I get this error.

#

"""
Traceback (most recent call last):
File "E:\Programs\Unity\2020.3.18f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 3063, in <module>
sys.exit(run())
File "E:\Programs\Unity\2020.3.18f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 2011, in run
optimizer.flush()
"E:\Programs\Unity\2020.3.18f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\js_optimizer.py", line 437, in run_on_js
filenames = [write_chunk(chunks[i], i) for i in range(len(chunks))]
File "E:\Programs\Unity\2020.3.18f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\js_optimizer.py", line 434, in write_chunk
f.write(serialized_extra_info)
IOError: [Errno 0] Error
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
"""

#

Would anyone like to help me this error?

#

Regards

drifting heron
#

Hi guys, does anyone know/have tried Photon works on webGL?

sharp briar
#

yes it works on WebGL, although "Photon" is not a single product, they have many different products: Pun, Bolt, Fusion, etc..

unborn nest
#

does PlayerPrefs work in webGL ?

graceful wigeon
strange goblet
rose gazelle
#

do events/actions get stripped in webgl?
A flow of functionality is getting called in editor but in the actual build it doesn't invoke the event; I can print out the event and its not null

rose gazelle
#

nvm can say its not being stripped, but can also say its not even being called...
Printing out the data of the action shows the correct method that will be called but just doesnt

sharp briar
#

the main differences in webgl are usually:

  • lack of threading
  • lower framerate
  • lower resolution
  • different hierarchy traversal order for things like Find and script execution order
rose gazelle
#

Theres most likely an error thats just not reported, but without it im at a lost for finding it

sturdy mulch
#

Hey, I'm having an issue where background music isn't playing in a certain scenario in the WebGL version
It's a rhythm game, that creates beatmaps out of midi files, so the midi files and the background music are very closely linked

Here's the code with the two most important parts circled:

#

filelocation is just a string that has the name of the file

#

I assume the issue lies in
midiFile = MidiFile.Read(Application.streamingAssetsPath + "/" + fileLocation[musicStage]);
and that maybe it has to get the file in a different way for webGL builds? but I don't know much about webGL or using streamingAssets in general, so any advice would be appreciated

#

(it functions fine in a regular Windows platform build)

orchid bridge
#

Access to XMLHttpRequest at 'link' from origin 'http://localhost:53404' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

#

Anyone knows how to solve this?

sharp briar
#

Like a UnityWebRequest or WWW

vestal spoke
#

hello guys. when I run webgl build on browser, I am getting memory overflow message

#

how can I fix it?

graceful wigeon
#

Heyou, do you guys know why some computers have trouble playing specific sounds on webgl builds?

muted vigil
#

I'm trying to have one instance of a project being played in WebGL streamed to another browser (probably also running Unity WebGL). Any idea how to do that? I think it would be with something like WebRTC. Is there an easy way to do that? Would just need to be the video, wouldn't need to be interactable (although if possible that would be even cooler).

sweet oriole
uncut sage
#

how can I redistribute my game onto a site?

graceful wigeon
sweet oriole
uncut sage
sweet oriole
#

You'll eventually find some web game portal that isn't blocked 😄

azure python
#

any idea why my URP project as a webgl build would not render anything that uses a lit shader (the standard URP one)? Only objects using an unlit shader show up, everything else is just grey. Tried disabling post processing, disabling shadows, removing normal maps from the materials.. not sure what to try next. This is on Unity 2021.2.2f1. I'm new to webgl, not sure what all is even supported etc.

idle comet
#

Have same issues with built in... seems like lit stuff is a bit broken on webgl with 2021.2. Currently we are running our webgl projects on 2020.3 without any issues

azure python
#

goo to hear it's not just me at leaast

uncut sage
#

How do people embed games using schema. Org

high patrol
#

have you tried using an iframe?

cinder creek
#

Hey guys, anyone can help me understand why my web app keeps restarting after a while? Might there be a code issue?

cinder creek
sweet oriole
#

I haven't seen that behaviour. Generally you get a pretty explicit message when something goes wrong

#

Did you check the console?

muted vigil
silent forge
cinder creek
zealous spruce
#

Hello 👋 Trying to figure out if Unity would work for a specific project. Would it be possible for a WebGL game to pull information from another source once connected (say an account somewhere else that lists which items are unlocked) and then set those items to be unlocked in the game?

cinder creek
zealous spruce
#

@cinder creek Can't ask for a better answer than that!

#

Thanks 🙂

cinder creek
#

No prob, I’m using Microsoft PlayFab which is free also!

zealous spruce
#

I'll take a peek 👀 Thanks again

charred briar
#

Be cautious, playfab is only free during development. They have changed pricing models 3 or 4 times in the last few years, and recently removed a bunch of the "free" items for development. Tread cautiously, they can change pricing on you without notice.

fading blaze
charred briar
#

Oh yeah, with WebGL you usually need to make sure as well the webpage is granting the WebGL the input too

steady cargo
#

Hey, I'm not sure if this channel is best place for this, but I'm running out of time with a jam 😄
I'm trying to build my game for WebGL but all 3D content is not rendered at all. UI is though.
I get this in the console:

[.WebGL-00005B48000AAA00] GL_INVALID_OPERATION: Mismatch between texture format and sampler type (signed/unsigned/float/shadow).

graceful wigeon
steady cargo
#

No, I'm pretty much going with the URP template 🙁
TBF, I did upgrade my Unity mid project. Maybe something broke... 🤦‍♂️

vital quartz
#

Hello

#

I am completely new to this format and would simply like to ask, how do I upload my VR build to an internet browser?

orchid bridge
#

hey does any know how i can fix this?

#

it was working on our previous build, but no build settings have been changed since the previous one

graceful wigeon
#

do a dev build and check the console in the browser

summer jacinth
#

For some reason when I press the fullscreen button in webgl it goes full screen but my game is still the same size and the rest is black

#

is there a solution

old pond
#

Does somone know when if every will WebGPU become a standard and could be used to build commercial projects? Like would it be possible to run unreal engine on web?

knotty lake
#

Hi all. When I posted my test game on play.unity.com and started playing, I saw a message saying: "The first play through is recorded to add a preview of the game". Where can I see this video or where will others see this video? Thanks!

clear saddle
#

im trying to run a 9:16 aspect game but this is the issue

#

im building a mobile game in webGl

#

works fine on unity

floral sonnet
steady cargo
#

@clear saddle you need to set the dimensions in the player settings, webgl section

frank obsidian
#

frens , quick noob question , im a student , I have often seen whole 3d games that are completely in browser , i dont understand how that works , what unity component is used for that , for example https://defiland.app/en & https://miniroyale.io ,

bronze glade
vital quartz
#

Hello

#

I am trying to create a webgl build

#

but I keep getting this error when I try to create the build Error building Player because scripts had compiler errors

#

Nothing is uploaded and this is the error I get Error building Player because scripts had compiler errors

frank obsidian
#

https://youtu.be/L82geOfpQCQ

  • This video shows, that unity can be exported to a WebGl compatible game , i assume this is the way ?

So you have made a game in Unity, and now you want to share and publish it online for everyone to play? Let's take a look at how we can do that!

Wondering how to make a game for beginners using the Unity engine? Great! The Official Guide to Your First Day in Unity is a Unity beginner tutorial series that shows you all the basics — from the Unit...

▶ Play video
vital quartz
#

Not finding the Share WebGL Game package

wet grail
#

Search for WebGL publisher package

vital quartz
#

found it

#

thanks

#

Still getting the player error

graceful wigeon
clear saddle
sweet oriole
# vital quartz Still getting the player error

Yea the WebGL publisher package is not directly related to WebGL building, as it's just a package to make uploading builds simpler. I would guess that SteamVR likely doesn't support browser as a platform, so there's probably something causing SteamVR to be excluded, which then breaks other stuff.

#

Assuming you don't have these errors when normally playing the game in editor

vital quartz
#

Fiddle

#

I'm trying to upload a Hurricane VR scene to a browser

#

Or atleast create a multi-player server under Pun

cinder creek
#

So Im using the Build Report Tool and trying to figure out whats being added to my build, whats the minimum size a blank build comes to?

high patrol
#

Has anyone tried to embed multiple webgl builds in a React (or any web framework) frontend?

#

is it possible?

torn pagoda
high patrol
abstract sonnet
#

Is WebGL 'secure' for my code ? Like can someone reverse-engineer or decompile it ?

serene summit
#

If they really want to sure

#

Your code is worth nothing though

#

And chances are, no one will want it anyways

abstract sonnet
#

That’s an easy answer

upper anchor
#

I am getting inconsistent fps & performance in WebGL on Mac on almost all browsers even on an almost empty project. On Windows, it's solid 60 fps. I've explained the issue in detail with profiler data on this blog post. https://forum.unity.com/threads/unity-mac-retina-webgl-inconsistent-performance.1206337/
Any help would be appreciated!

granite mesa
#

Hello - would anyone be able to assist me with issues I am having packaging and running my project as WebGL?

sweet oriole
#

It's unlikely to work by opening the index.html file in your browser without it getting served from a web server due to browser security stuff when it comes to running local files. Build and Run button in the build window spins you up a web server for quick testing.

snow fractal
#

guys, i have a questions, which technology like assets Delivery of google can use in unity webgl ? the assets delivery of google didn't work for webgl, some one can help me, thank you very much. VintageUnity

pliant steeple
#

I imported assets into unity, when building the web, the image is not sharp
How should I configure for HTML5 ?
Sorry I'm not good at English

upbeat minnow
fluid oasis
#

My html file is correctly calling my unity function but is not doing window.alert, any idea why?

cinder creek
#

Where do downloaded files get stored in browser? I’m using UnityWebRequest to download file…

small coral
#

Hi, I am trying to host a webgl game on my site. Since my level is big in size, I was wondering if their is any sort of level streaming or any comparable technique where I can seamlessy load/unload chunks of my map to reduce loading time for my player.

grizzled isle
#

pasted from another channel in the server

I need advice from someone familiar with WebGL and making a website open a game as an app (not in the browser). The code from the old sso website that opened the game is missing, me and my friend want to rewrite it but we need help
Anyone able to provide at least advice on how to do it?

fluid oasis
#

Unity isn't calling the basic html script in my webgl project, any ideas why?. Don't ask for code cause there is nothing i can give you cause it is not a coding problem.

small coral
# cinder creek Addressables?

Consider me a unity noob. A quick look at addresables tell me it should fit what I am trying to achieve. Does addresables work in webgl builds ?

cinder creek
#

Building my project to see...

small coral
# cinder creek Building my project to see...

Cool, please do tell me the results of the tests, I am very much interested.
On a different note, can I use addresables to both load and unload, and perhaps reload assets asynchronously ? I was thinking of using triggers to do the same.

thorny spindle
#

hello fellow unity developers, can anyone explain the difference between Module.dynCall_vi, Module.dynCall_vii and Module.dynCall_viii (old Runtime.dynCall('v',...))? do we just add the amount of i equal to the size of the array of the parameters?

#

ok, nvm, found this article https://jmschrack.dev/posts/UnityWebGL/

cinder creek
small coral
sweet oriole
#

Addressables does support WebGL.

cinder creek
#

What I am learning is that with Addressables, I can just add the prefab to group and it will carry the references of all the textures, materials etc with it...

cinder creek
#

Hmm...does addressables work on mobile webgl?

modern plank
#

Hi! So I'm working on a multiplayer FPS game where I have a WebGL build hosted on a website. I noticed that the game is quite laggy on computers with less beefy GPUs, but the game seems to run a lot faster when the player looks at the sky.

This confuses me a little bit. Does WebGL automatically perform back-face or frustum culling?

sweet oriole
high patrol
#

webgl builds are single threaded too (right now) so performance will be an issue

tribal night
#

Hello! I just uploaded my game to Itch.io as WebGL, but when starting its only a blank screen? The music is playing, but only a blank void screen

#

So I realise I can actually walk around and play it! I hear all the sounds, but there is just nothing showing up on the screen!

tribal night
#

Does anyone know why it does this?

as soon as I press build in unity, in the editor the scenes dissapear and it is the same blank screen as when I play it

sweet oriole
#

Did you check browser console log?

brave oxide
#

Hello ! I have a problem with Webgl building , is this the correct place to get help ?

high patrol
#

When I set the style for the Unity component in react it throws an emscripten error

#

Oh, now it's throwing that error all the time even with styles deleted

#

It still plays the webgl game, but it throws that error when clicking the link to go to the game

high patrol
#

I honestly don't know if this is an emscripten related error or something with React or the react-unity-webgl component or something with Unity's implementation of it Uncaught TypeError: target is null _emscripten_set_wheel_callback_on_thread http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:9327 createExportWrapper http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:1027 browserIterationFunc http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:9152 callUserCallback http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:7351 runIter http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:7412 Browser_mainLoop_runner http://localhost:3000/buildFolder/FirstWebGLBuild.framework.js:7326

high patrol
#

AHA, I found rolling back the Unity version for the build resolved the issue. I think this has to do with the newer Unity version using a newer version of emscripten, which is causing issues. I feel like this should be brought to the webgl teams' attention if they don't already know about it

sweet oriole
round echo
#

hey guys whenever i use WebGL for build all of my sound files crashes. But i dont have any problems with other platforms... is it like common bug or something? or am i doing something wrong? (2020.3.22f1)

#

maybe i need update to latest one?

round echo
#

Errors during import of AudioClip Assets/Resources/SoundEffects/01_LOOP_I_Packed_My_Bag_by_Florian_Stracker.wav:
FSBTool ERROR: An operating system based file error was encountered.

winged acorn
#

Hey all, quick question regarding Unity Play: Is there a way to edit the webgl associated with a project? So the url stays the same but the playable build changes

snow fractal
#

hi guys, i wanna ask about optimize images in webgl, how can i do that ? thanks all

cinder creek
#

Anyone here using Addressables?

#

I want some tips on getting it to initialize faster on mobile web…

cinder creek
charred tulip
#

hey, I've created a webgl build and I'm serving the index.html file it automatically generates through a next.js app. I keep getting these errors in the console, and nothing loads except some ui buttons without text

#

does anyone have any idea why this is? I've searched everywhere and haven't even come across someone with the same errors

unkempt verge
#

Did anyone encounter a weird issue of WebGL failing due to "Error building Player because scripts had compiler errors" but with no actual errors in the console or in the log file?

#

We're trying to check if we can run our IL2CPP mobile game on webgl, but this obscure condition is a real problem

#

unity 2019.4.34f1

cloud cairn
unkempt verge
#

and it actually did state what exactly are the errors

#

some bogus dll that became duplicated in webGL due to an error in config

unkempt verge
#

but yeah, resolved it with upgrading

brittle kayak
#

How do I fix sprite shapes not rendering in webgl?

wintry wagon
#

Hello Dear community.
I need your help.
We have made a racing game running on webGL, so far it's working well but we noticed that if the longer you let the game open/launched, the more it's laggy (whatever browser, whatever computer/specs)

We really can't find why, do you guys have some ideas?🙏

fading blaze
astral wave
#

How to solve problem with WebGL, that if Unity object loses focus, the keyboard input does not reset? For example if I hold Space and press on other HTML object in unity, or outside browser, the character continues to jump. As in WebGL passes keyboard input. Disabling and enabling character controller does not work, because it just continues to pass space button to client. Same with unity 2019, 2021.....

astral wave
#

it doesnt work with neither legacy or new input system. Even if settings states things like that

astral wave
#

2021 and new input systems at least stops moving when out of focus, but when it comes back to focus it never register key up... and the button keeps beeing pressed until you press it again.... Please, I am begging you save me from this nightmare

high patrol
#

Roadmap is missing on the website https://unity.com/roadmap/unity-platform/platforms

Unity

Reach a wider audience and feel confident that your IP is ready for the future, no matter how the industry evolves or where your imagination takes you. Build your content and deploy across more than 20 platforms to captivate audiences across formats.

karmic cargo
#

Any one know how to clear WebGL catch from iphone safari ?

I am working on project using Unity3D 2020 and Zapwork Universal SDK 3
after few testing iphone safari not loading experience.
and using same model different device working fine

pliant steeple
karmic cargo
#

Means you need to interact with JavaScript correct ?

pliant steeple
#

no, How to call async/await JavaScript function in Unity/C# WebGL platform?

high patrol
#

Yes, the 2020 LTS version works, but they made some breaking changes to 2021 that are not fixable atm

sweet oriole
#

@plush sun Are you running this by Build And Run or is this hosted somewhere?

orchid bridge
#

Honestly, I turn off compression for webGL. For some reason, compressed files (gzip) never renders. I haven’t debugged why; I just disable compression in “Player Settings” and export like that.

If you are looking for a quick fix, that might be a good test to try.

frank totem
#

Hey! Im having some trouble with CORS requests with my embedded WebGL build on my site. Is there a way to debug or find out whats the problem?

rare siren
#

hey guys, any one got a good article/video on how to parse json data into unity?

wide garden
#

used LitJson

#

create a variable like this:

using LitJson;

public class Whatever : MonoBehaviour
{
    public JsonData jsonvale;

    public void Start()
    {
        jsonvale = JsonMapper.ToObject(JSONLink);
    }
}

Then to call specific data you need from that json file you can just search of the name of the variable in that file

var isData = (bool)jsonvale["loggedIn"];


ofcourse JsonLink is whatever json string you have.

#

@rare siren

#

if you want the whole script that pulls it from a link aswell let me know and ill give it to you. Dm is open for that

rare siren
#

cheers mate

tribal jacinth
#

hello, VideoPlayer with StreamingAssets displays correctly when accessed through chrome PC, it doesn't when accessed through chrome Android. Does anyone know how to make it work or has any tips?

tribal jacinth
#

if someone has the same problem, i fixed it! Make sure the window has focus before loading the videos.

oblique saddle
#

Hey there, does anyone know if i can use different webgl templates for different scenes in my game ?

sweet oriole
oblique saddle
# sweet oriole What exactly are you trying to accomplish?

So basically im making a game that interacts with the blockchain and my first scene is a authentication scene which authenticates with metamask. Then the player gets into my game, where they can send transactions in the eth network, and the transaction window has its own scene. And that transaction windows requires andifferent webgl template to work

sweet oriole
#

Can't you combine the sites?

#

Have everything required in the same site

oblique saddle
lime lintel
#

Oh i didnt even know there was a webgl room

#

Anyone has issues using 2021.2.7f1 with urp?

#

this is in forward rendering, in deferred; every object is invisible except the UI

hardy panther
#

yo wtf that looks awesome

lime lintel
boreal tartan
#

Sorry for the somewhat random question, but I thought you all might know. Until just last week, I have always been able to run local WebGL builds off my hard drive in Firefox by setting the file-unique-origin preference in Firefox to false (this is extremely helpful when I need to test 40 student projects without uploading them all to a web server). It seems like the latest Firefox build (or the latest Unity WebGL) now prevents this from working, so now I don't seem to have any ability to play WebGL builds from my local hard drive (except Build and Run, but I can't do that for 40 student projects).
Do any of you happen to know of a way to run WebGL builds off a local hard drive now that this Firefox method seems to no longer work?

cunning oak
#

you can also just have a folder with all webgl builds you want to test and run the command in that folder instead, the localhost:8000 will then display all those folder as clickable links which will allow you to open each webgl build as you wish

boreal tartan
dreamy wadi
# cunning oak download python and then run `python -m http.server` inside the folder that cont...

Does this method work for you?

Doing so gives me this error in the console:

  • Unable to parse Build/WGL.framework.js.gz! This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: gzip" present. Check browser Console and Devtools Network tab to debug. WGL.loader.js:1:162

Server details:

$ /c/Python310/python -m http.server 8000
::ffff:127.0.0.1 - - [04/Jan/2022 09:45:22] "GET / HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:45:22] "GET /Build/WGL.loader.js HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:45:22] code 404, message File not found
::ffff:127.0.0.1 - - [04/Jan/2022 09:45:22] "GET /favicon.ico HTTP/1.1" 404 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:45:44] "GET / HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] "GET / HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] "GET /Build/WGL.loader.js HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] "GET /Build/WGL.framework.js.gz HTTP/1.1" 200 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] code 404, message File not found
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] "GET /favicon.ico HTTP/1.1" 404 -
::ffff:127.0.0.1 - - [04/Jan/2022 09:46:34] "GET /Build/WGL.data.gz HTTP/1.1" 200 -
cunning oak
#

@dreamy wadi enable to allow compression fallback (something like that) in the Player Settings

dreamy wadi
#

Thanks Coimbra, I appreciate your help with this.

Here are my notes for anyone else struggling.

System

  • Unity 2021.2.7f1 Windows 10 Git Bash

Unity WEBGL Build Preference Changes

  • See Screenshot
    • Circled items indicate Dialog progression, and setting changes.

Git Bash Commands

  • To get this working you can use python2 or python3, and depending on which one, you will need to adjust which module you use.
  • To find out which python you have installed you may type which python inside of Git Bash
$ which python
/c/Python27/python
  • Based on this result we now know that we have python version 2.7 is installed at C:\Python27\python

  • (Note: Your python version may also be found by running python --version)

  • If you want to use Python 2.7 use the SimpleHttpServer module:

$ /c/Python27/python -m SimpleHTTPServer 8080
Serving HTTP on 0.0.0.0 port 8080 ...
  • If you want to use Python 3.10 use the http.server module:
$ /c/Python310/python -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 ...

Notes For Unity Team Follow Up

  • The BuildTools/SimpleWebServer.exe runs, but the webserver does not seem to allow any connection, even though the output indicates a started web server.

    • Following command was tested in Git Bash, and Admin elevated Powershell
      (Note: If testing command in Powershell you will need to remove the Quotes ")
$ "PATH-TO-UNITY/2021.2.7f1/Editor/Data/MonoBleedingEdge/bin/mono.exe" "PATH-TO-UNITY/2021.2.7f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/SimpleWebServer.exe" "PATH-TO-UNITY-PROJECT\WGL-BUILD" 8080
Starting web server at http://localhost:8080/
astral wave
#

It seams that in unity 2021.2 variable Runtime doesn't exist anymore and was replaced with Module['dynCall'].
So I am meeting a lot of errors in plugins that were using old way of calling dynCall. For example Mirror developers named it as Unity bug, and is waiting for unity fix. It is possible to fix some of errors by changing all Runtime.dynCall('1', 2, [3, *4]) for Module['dynCall1'](2, *3, *4)
(websockets example)
change Runtime.dynCall('vi', webSocketState.onOpen, [ instanceId ]);
for
Module['dynCall_vi'](webSocketState.onOpen, instanceId);

However I cannot find the correct way of changing all functions with correct parameters passing and keep getting errors. I saw multiple issues about this error, I wondered if anyone know more about it? Should I expect it to be fixed in next Unity version? Or it will be needed to fixed manually or something like that?

dreamy wadi
#

V2021.2.X Variable Runtime replaced by Module[dynCall]

astral wave
# lime lintel Oh i didnt even know there was a webgl room

https://fogbugz.unity3d.com/default.asp?1390534_2i08u9h536ljnmre
https://forum.unity.com/threads/urp-lit-sample-is-missing-all-shaders-in-webgl-build.1205704/
https://forum.unity.com/threads/shaders-not-rendering-in-build-2021-2-7f1-urp.1216224/#post-7759986
Only workaround I found is disabling Receiving shadows option in Materials. Well it is obvious what it will give, but better than nothing I guess.
I do believe you are having this. which is not fixed. Maybe anyone else have any info about this?

lime lintel
wide garden
#

hmm maybe if you wrote your own shader that would fix it? i doubt it. but i run the build in render pipeline + bakery and i had to write a few shaders on my own

flat creek
#

hi folks, I am using unity 2021.2.6f1, and with this version there is no "UnityProgress.js" when I build my WebGL game is it part of index.html now? or builLoader

outer rampart
astral wave
astral wave
wide garden
#

good 2 know

lime lintel
flat creek
#

There are also ready made templates too

#

But the issue is that it doesn't load when I host it to a website, for example, a github Web page, I changed the compressions and alot of things people said to do, and nothing worked

high patrol
lime lintel
#

its great.

high patrol
#

yeah I've had issues with the newer versions as well

lime lintel
#

i would downgrade to the previous one but i dont feel like backing my project

high patrol
#

pretty buggy

lime lintel
#

yep

#

this is with forward rendering

#

the colorful fuckfest is the deferred one

#

or maybe it was other way around, idk anymore

#

go test it for me

#

dont set any stripping on

#

see if it works

high patrol
#

I know the difference between the two but never know how it causes those weird artifacts

lime lintel
#

¯_(ツ)_/¯

#

looks like an rgb pass to me

#

and since deferred has a doouble pass so it can have spotlight shadows and stuff....ye

#

i wonder when they will pull out a fix for this...

high patrol
#

Oh did you find that in the frame debugger

lime lintel
lime lintel
#

ok 21.2.6f also has an issue with webgl shaders being invisible; i forgot

#

at least it doesnt completely destroy the rendering

orchid bridge
#

does anyone know how to change the tab name?

copper siren
daring lake
daring lake
astral wave
flat creek
deft plover
#

so when you build a game in webgl, does the page automatically open in the browser? because this time it didn't

#

wait fuck i didnt do build an run fuckkk

orchid bridge
#

Hey guys, i've been trying to get a Webgl build done, but it gives me the same error over and over and i can't figure out why. If anyone can help me with this i appreciate that

orchid bridge
#

I've finally found the answer:
sudo apt install libtinfo5
sudo ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5

vernal swift
#

but I can't figure out what's bad :| content-encoding response is correct as br now

#

works without any issue with chrome

#

not sure why its always problematic with firefox

dusty moon
#

how can i fix this

rustic relic
#

I am trying to write some JS into a jslib for my webgl build, but I am running into problems with declaring a javascript class. Does unity not read js classes and only simple functions?

#

Deploying to webgl fails when I have a javascript class in the .jslib (any class, I've stripped it down to the bare basics), and it throws an "unidentified token" warning and stops the deploy. This leads me to think it's not compatible?

#

even something as basic as this:

arctic rose
#

That's not valid JS

#

The class declaration must be outside the mergeInto call and in mergeInto you put the functions that you call from C#

rustic relic
astral wave
# dusty moon how can i fix this

Press F12, open console, press okay and it migth show you more data about error. This error says nothing to us. If there is none, then build Developer build of webgl with full stack trace option in build settings/ player settings/ others

dusty moon
#

it sends it when publishing

serene summit
#

There's an error on your server

#

Go check your server logs

dusty moon
serene summit
#

Depends on your server

dusty moon
serene summit
#

I mean I can't answer that for you, you probably uploaded your webgl game somewhere that's hosting it

#

Which is your server

dusty moon
#

its hosted on the unity play thing

#

in the browser

serene summit
#

Idk how unity play works so I can't help

cyan oak
#

hey, im pretty new, but how would I add a web build to a wix site?

#

like wehre in the build folder can i find the embed code

astral wave
# cyan oak hey, im pretty new, but how would I add a web build to a wix site?

2019 answer;

Getting a Unity project onto a website now requires uploading HTML5/WebGL custom code.

https://support.wix.com/en/article/embedding-custom-code-to-your-site

Getting custom code onto Wix requires that you have a custom domain.

https://support.wix.com/en/article/connecting-a-domain-to-your-site

Getting a custom domain requires you pay at least $13/mo.

https://www.wix.com/upgrade/website

But that solution opens up yet another can of worms as the basic plan only provides you with 2GB bandwidth. Getting a plan that removes the bandwidth limitation and allows your site to be useful is $17/mo. You've now surpassed the cost of just about every shared hosting provider out there while having worse features (most of them provide effectively unlimited space in addition to effectively unlimited bandwidth).

Wix is barely acceptable for a free website. Once you need a paid website it's one of the worst options available. If you don't have any skills in making your own website you're far better off with a company like Square Space which has more features for about the same price.

2021 answer:

https://www.youtube.com/watch?v=atC0s7HqBnc&ab_channel=PolycarbonGames
ember remnant
#

im using 2 server is Photon and Colyseus but look like build web just can use one of them, there is anyway to use all 2 server?

serene summit
#

You probably want to delete one of the webscoket library, it has a conflict when copying so it fails

astral wave
#

if you will have problems after that that one of assets wont see websockets library anymore, add namespaces of it so it could see it.

orchid bridge
#

Does someone know how I can add webGL build for html code?

void elm
orchid bridge
#

Ok thanks! I try that.

astral wave
#

Intel Core i5-6400
8gb Ram
What is the most you can pull out of webGL game? maybe anyone have examples or some guidelines i should aim for?\

astral wave
lime lintel
sick sand
#

Hi guys, i'm sorry to ask what might be a dumb question, but i am not able to build WebGL builds. The process starts, goes on for couple of minutes then stops and gives errors. I tried googling for few hours over few days and attempts, putting different parts of the error message in search engines but im no closer to understanding how to troubleshoot this.
I think this is the one that matters, but yeah, not sure.
If anyone decides to respond, thanks in advance!

serene summit
#

What's that ? in your file path? ?reate with code

sick sand
#

Not sure, i don't know what it is supposed to open. This usually happens when an alphabet isn't supported by the software, i think. So it might be trying to open something with cyrillic letters in it?

#

?reate with code
sorry i don't know what this means

#

oh wait i get it

#

one second, trying something

serene summit
#

Well it's your filepath

#

So go check what it is

#

It might just not be supported in the path and that causes otehr issues

sick sand
#

ye i did that, i think the first letter might be cyrillic for some reason
changed the path, tried to save to another folder, still nothing

#

i guess this is the overview

#

and the first error message is now this
It continues for a long while

vast walrus
#

plessse help

polar monolith
#

disable compression under Publishing Settings in Player Settings then build it again

tight sparrow
#

is input system fully supported on webgl?

vast walrus
#

thanks

lime lintel
#

u can write ur own tap code though; not that difficult

lime lintel
#

¯_(ツ)_/¯

robust ginkgo
#

Hi guys, I have finished a Unity project and now I want to publish it as WebGL. But now I see that in one scene the light totally flickers as soon as I move in it. Does anyone know what could be the reason for this?
I can send you a video or the link to the game privately.

vast walrus
#

why isnt this loading

astral wave
orchid bridge
#

Is webGL bad for multiplayer games

#

I get “Exiting receive thread… Abnormal disconnection” when trying to load a large scene in browser

astral wave
lime lintel
sweet oriole
astral wave
lime lintel
astral wave
# lime lintel im sure someone already did that; i kind of ....replaced the shaders the same ho...

Not so long ago I made report of a WebGL bug that is 3-4 years old as from what I saw in forums, and only now it was added to tracked bug list. And nobody did normal report on it. Nobody cares about WebGL (i wish i wouldnt need to care as well), so report and sending default project with that bug is HUGE.. Like HUGE. But if you already removed problem and there is nothing to show... well oh well, thank you for informing me, I will check all two custom shaders I have just in case:D

lime lintel
#

👍

#

what was that bug anyway?

#

and webgl is pretty useful - its good for showing off quick demos for asset store stuff or actual games

#

browser games are pretty much dead though

astral wave
#

Bug where if your webgl loses focus, the buttons that were pressed at that moment will be stuck until it will be pressed again. pretty you walk, press on modal or something like that and continue to walk forever 😄

lime lintel
#

lol

#

pressing it again in focus doesnt fix that?

#

weird....well hopefully the new input system fixes such stuff

cinder creek
#

Anyone know how to set this?

#

"You can reduce startup time if you configure your web server to add "Content-Encoding: br" response header when serving ".unityweb" file"

#

The Content Encoding, im using Github to serve the webgl build...

#

I have no idea where to start with this...

arctic rose
#

You can't set custom headers on Github

undone moth
#

Hey guys, I've got a scene with nothing in it that just downloads addressables, but the webgl folder is still about 80mb, how do I shrink this?

#

Whoops, forget about that, I didn't realise that the analyze tool required me to change build and load paths to be remote 🙂

tranquil osprey
tulip vine
#

Hello we are currently having some errors related to unity webgl and i have no clue where to look these are the errors when swapping to a page away from the game:

#

<@&502880774467354641> am i allowed to place a bounty on my problem?

frank lynx
#

@tulip vine This isn't an official contact source for Unity bug reporting. You can submit a bug through the editor, or post it on the forums.

ornate pecan
#

Anyone having this issue?
crbug/1173575, non-JS module files deprecated.

daring lake
undone moth
#

Anyone know how to solve wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'. I've got everything set up as recommended in the .htaccess, and it does load, but it just waits for a while before it continues

#

It keeps serving the .wasm file as text/plain instead of application/wasm, regardless of AddType application/wasm .wasm.gz

obsidian cliff
undone moth
haughty shoal
#

Yo guys, how can I testing my webgl game in browser? Without zip the folder.

frank lynx
#

If you have your own site, you can just upload the contents of the build to a directory.

vital tapir
orchid bridge
#

i was just playing your game

#

lol

vital tapir
orchid bridge
#

im eating meat being attacked by dogs an rocks and eggs?

vital tapir
shell hamlet
#

Plzzz help me when I import my game to webgl it gives me bugs that aren’t in the game before I built it

sweet oriole
old pond
#

Is it possible to create a openworld big game using WebGL? Can you load unload assets?

sweet oriole
#

You can load and unload assets, but doing it during gameplay might be difficult for performance reasons. Unity doesn't have out of the box threading support for WebGL.

#

Testing on the target hardware would be crucial for a project like this

empty vortex
#

Hey guys! I don't know if this question belongs here, but I would like to make a WebGL build be edge-to-edge (no whitespaces). How would I go about doing that? I am using an SDK for the game I am making and the template is not really edge to edge. I found the Better Unity WebGL template git repo but I am not sure how to adapt it for my existing styles.css file. Could someone guide me through this?

haughty shoal
astral wave
astral wave
# empty vortex Hey guys! I don't know if this question belongs here, but I would like to make a...

Depends on Unity version you are using. If 2019 or earlier, then

<div id="game" style="padding: 0px;">
        <div id="gameContainer" style="padding: 0px; margin: 0px; border: 0px; position: relative; background: rgb(35, 31,         32);">
            <canvas id="#canvas" style="width: 100%; height: 100%; cursor: default;" width="948" height="937"></canvas>
        </div>
</div>

With default options of your template it will be full screen without problems. So it is more CSS question than WebGL. But if you using new Unity 2020 or 2021 there are some changes in java script part for that:

Mainly

        canvas.style.width = "100%";  // by default it is set to your build resolution
        canvas.style.height = "100%"; // by default it is set to your build resolution

also this is worth to give attention to

        var config = {<..>};
        // By default Unity keeps WebGL canvas render target size matched with
        // the DOM size of the canvas element (scaled by window.devicePixelRatio)
        // Set this to false if you want to decouple this synchronization from
        // happening inside the engine, and you would instead like to size up
        // the canvas DOM size and WebGL render target sizes yourself.
        // config.matchWebGLToCanvasSize = false;
shell hamlet
#

I just imported my game to webgl but it didn’t work and came up with this 👇 plz someone help

high patrol
#

If you embed it in a react site it's even easier to resize the windows

#

and you can embed multiple webgl builds in a single site

#

just don't use 2021 because things are broken for those webgl versions still

orchid bridge
#

sense

undone moth
#

Having an issue with a single game where upon load the page freezes and the browser prompts me to kill the page. When I run that scene as an addressable, it seems like it downloads everything without issues at first, but takes forever at around 87-90%. I've got much, much larger and more complex scenes that load almost instantly?

old pond
serene summit
#

You definitely don't need all assets in ram at the same time

#

So you load from disk and free from memory

high patrol
#

well on webgl you can't load from disk

#

I think maybe addressables would be the way to go

sweet oriole
#

@high patrol Browsers do have virtual filesystem you can write to and read from, which is how Addressable caches downloads and PlayerPrefs functions.

high patrol
#

isn't the vfs like 5MB max size?

sweet oriole
#

Firefox seems to cap out at 2GB

high patrol
#

Ok cool, that seems usable

sweet oriole
#

Quick additional searching suggests that you can probably expect to have at least 250MB of offline space available, assuming the device isn't running out of space

#

Including browsers running on mobile

#

On desktop you likely have a lot more

high patrol
#

Not finding relevant info

#

looking for the right rabbit hole

high patrol
#

thank you thank you

noble phoenix
#

Hi, i need to make an online multiplayer project for web/browser and was wondering if Unity was good for that task or if another program would be better

sweet oriole
#

Desktop engines ported with webassembly tend to be a bit chunky in a lot of ways, so platform specific options like PlayCanvas are certainly worth evaluating, but nothing specific to web quite matches what desktop engines tend to offer in features, ecosystem and ergonomics.

astral wave
# old pond How would you than build a game in which all assets can’t fit in ram, example Mi...

Well you have cache in browser, but that would require to create custom cache controller. In theory you start with storing assets in Streaming assets, or other location which is downloaded when you download game. Then during game you load those assets and unload when not needed. As you can download everything and it will be saved on your browser, but not RAM memory. I personally dont know why would you want to create anything that dont fit into RAM on webGL. but that would be a way to approach it. Tbh, WebGL isn't the best choice for visually challenging ways, like ThreeJS and etc, as you will get higher performance out of them. Also webgl does not support HRP, so you will be stuck with Maximum quality of URP.

high patrol
#

if you're trying to make it look great in a webgl build don't get your hopes up. Expectation:

#

reality:

undone moth
high patrol
undone moth
# high patrol

I genuinely don’t see a difference between the very first picture and this. This is what webgl needs more of

burnt turtle
#

which unity version do you advise me to use for Unity WebGL Mobile? I'm currently using 2020.3.15f2 but it has a bug on OnPointerDown, when I trigger the event by touching to item, it should only trigger once but event is being spammed

high patrol
#

hmmmmm well in general I'd recommend staying within the 2020.3 realm. OnPointerDown usually gets replaced with IPointerClickHandler

burnt turtle
#

that matters since it creates a problem on my "jump button"

high patrol
#

I've been using the new input system anyways so it's easier to hook into, if you spend more time setting it up. tradeoffs

burnt turtle
#

it works perfectly in webgl mobile?

high patrol
#

haven't tried with webgl mobile, how are you exporting the project to that format?

burnt turtle
#

well, it's WebGL build

#

but opening it in mobile browser

high patrol
#

how are you getting it to the mobile device

burnt turtle
high patrol
#

oh gotcha

#

have you tried using the new input system with that format?

burnt turtle
#

nah, i didn't try it but i think i saw somewhere it weren't working in mobile webgl

high patrol
#

yeah it wouldn't surprise me, Unity doesn't officially support mobile browsers

#

so you're a pioneer in that aspect

#

you may discover a trove of treasure at the end...or die of dysentery lol

burnt turtle
high patrol
#

lol

#

So it looks like they're recommending playcanvas

burnt turtle
#

yeah, if i can't find a way i will use it as looks
i've a old made game in unity, i was trying to port it to HTML5

empty vortex
old pond
vital zenith
#

Hi everyone, does anyone have trouble with secondary texture maps on WebGL? works fine on editor but on build they are gone (Standard shader adding an albedo detail map for example) Is this not supported at all?

#

There is strangely very little on google about that... only one post from 2016 without answers. So I find it very strange.

astral wave
astral wave
vital zenith
astral wave
vital zenith
#

No, sorry, should have stated that. legacy

astral wave
#

at 2021.2.7 there were bug that URP did not render if "receive shadows" option were on. in 2027.2.8 it was fixed. Try checking if that helps you.
new unity uses new shader graph, sometimes old shaders wont work until you open them with new shader graph and save it again. Try doing that
If neither of them helps, it is most likely Unity bug. Please use Help -> Report bug feature in Unity, it will help a lot.

#

also you can try moving to URP, maybe it will solve your problem if you have it on legacy.

vital zenith
#

Great help! That gives me a bunch of things to try out. Thanks a lot!

astral wave
#

No problems. I just here to see others suffer together with me... WebGl ☠️

sweet oriole
#

Anyone looked into the PWA WebGL template? Quick search isn't returning many results

astral wave
sweet oriole
#

This is present at least in Unity 2022.1 beta

astral wave
#

oh, I still strugling with 2021 bugs, not ready for 2022 😄 but it looks inetersting. did not hear anything about it yet from Unity

sweet oriole
#

Struggles of 2021 bugs pushed me here 😄

astral wave
#

shouldn't it push back to 2020 or 2019? 😄

sweet oriole
#

No, because those versions push me back to versions with SRP batching support 😄

astral wave
#

but why not URP ? 😄

sweet oriole
astral wave
astral wave
sweet oriole
sweet oriole
#

The WebGL team is making continuous progress, so each update tends to have at least something nice, either as a feature/improvement or bug fix.

astral wave
#

welp anyways. 2021.2.9f is bugged on my project, can build Server only with 2021.2.8f. so at least will have possibility to test.

sweet oriole
#

People shipping mobile WebGL projects seem to be getting presents in newer Unity releases

#

Current beta no longer has the mobile browser warning that pops up, if that is any indicator

astral wave
#

Dont give them that oportunities :DDDDDD

#

because that will make my next task to build it....

sweet oriole
#

😄

burnt turtle
digital zenith
regal mural
#

Has anyone managed to connect the discord SDK to webgl? (Auth, writing etc)

wet wing
#

We just updated our project to Unity 2021.2.8f1 in hopes Safari would be better supported, but it seems even worse now - we're getting what appears to be some infinite loop in Release.loader.js -

[Line 146:55 Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded.] 
#

anyone have any experience with this?

cinder creek
high patrol
#

Hmm I've had numerous issues with 2021 and webgl, my recommendation is to stick with 2020.3 until things are ironed out with 2021

#

Safari isn't exactly bleeding edge in the browser industry like firefox is

sweet oriole
#

Latest beta seems to be alright too. 2022.1.0b2 wasn't, as that has some rendering bug with URP 😛

plain cliff
#

Im trying to create awebgl build but it's taking too long

alpine patrol
#

Hey folks! I'm trying to export my unity project to webgl, but when I try to use the send message API, it cuts the message.
Does the SendMessage API have a limit? If so, how can I increase it?

heady cypress
#

how big a message we talking?

lavish oasis
#

Hhhhhh what do

serene summit
#

Fix your compilation errors

lavish oasis
#

Nvm I just had to restart the project

#

Bc every other screen said "no errors" so I was annoyed

digital zenith
plain cliff
#

Help My webGl build is stuck at 90%

sweet oriole
#

Check browser console for potential additional info

plain cliff
#

Im seeing bunch of errors in the console

cinder creek
buoyant vector
#

Hi all. I need help with pasting link to my first game release on Itch.io. This is WebGL build. But when I paste a link it says "warning beware discord scammers" when I saw this I got scared and removed the post in completed-projects channel.
How can I paste the link and not get flag? This is my first Unity complete project.
Any suggestions?

cinder creek
#

Hey guys, any update from devs about faster quicker webgl building? Also what makes builds take longer, since they are wildly different even changes aren't made to the project...

tough idol
#

im use replit, help

#

im new to unity

vital zenith
safe imp
#

Hello !
I have a problem, when I'm doing a build in webgl, a whole whunk of my mountain disappear. I rebaked the occulsion already, but it didn't change anything. Someone would know how to fiw that please? uhmm

red night
#

Hello all, currently building a 3D gallery space to host NFTs, some NFTS require GIF support I'm currently under the assumption unity does not support GIF after googling for some time, Is there a simple work around that I'm missing? Just trying to have GIFs display on a quad.

worldly mist
serene summit
#

Is that supported in webgl?

worldly mist
#

i dont know actually i never used both of them

stiff burrow
#

im trying to access a Texture that i created with gl.createTexture in a WebGL build. i use Texture2D.CreateExternalTexture and try to set that texture to a RawImage.Texture after that i get an memory access out of bounds in the browser. Did someone try smth similar ?

red night
#

I'm not sure I'll have to give it shot, in previous webgl builds i've done video was not supported, but I could be doing something wrong on my end

astral wave
hard dagger
#

What is a good ressource to learn about Unity and WebGL?

I was a Unity Dev, went to WebDev and now I am using ThreeJS.
Curious about what Unity offers in the WebGL Area, especially in Combination with AR and does Unity compile to Webassembly or how it works there?

static bobcat
#

Hi. I made a simple image Slideshow and built it with WebGL. Wenn I start the index with a live server, it doesn't load the application

#

can anyone help?

granite verge
#

Hi all, I was wondering if someone could help me interpret this spike that is murdering my framerate in the mid-game (WebGL build):

#

Screenshot of the 'stuck' frame too. I haven't used the profiler much so far so I'm at a bit of a loss.

placid vale
#

Anybody know why my video player in webgl urp is all black but I can hear the video?

woven forum
#

Hey guys I'm new here (I hope this is the right place for this). I'm currently working on my own unity game for webGL. My game uses agora.io for video streaming. I now need to work on networking to enable multiplayer. I noticed that .NET networking does not work on webGL. Any suggestion on what I could use instead. I'm a bit lost will all the documentation –I'm new to unity, struggling a bit. Would really appreciate it if someone can put me in the right direction. Cheers!

night bay
night bay
#

also, my game uses middle mouse button for functions. But when middle clicking in-browser it tries to pan the webpage. is there a fix for this?

sweet oriole
wet wing
#

Unity WebGL build running on Safari - whenever the SceneManager is attempting to load a scene it freezes with the error message (within Release.loader.js):

[Line 146:55 Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded.]

game runs just fine in Chrome and Firefox, and as long as I never attempt load a new scene, it seems to run ok in Safari
Does anyone have any advice or experience with this?

orchid bridge
#

hey web masters any fix

vestal cloak
#

Your browser does not support cross-site requests. If you use Unity's Build And Run it hosts a local web server itself that you can run the game with during testing. Otherwise you have to use a program like https://laragon.org/ to host a local web server using apache, or host it externally on something like Itch.

fading blaze
# orchid bridge hey web masters any fix

Also, I wouldn't use Brotli Compression if you are new to web tech. You need extra settings on the server side to serve the .br files and uncompress successfully on the client side.
Just Disable the Compression Format before you build. Your build will be bigger but you can run it on a local server or simple online hosting.

orchid bridge
#

I just had to disable what u said 🙏👌

fading blaze
# woven forum Hey guys I'm new here (I hope this is the right place for this). I'm currently w...

From what I know (currently) the Agora Video SDK does NOT support WebGL. They have it in view but never know when it will happen.
In the mean time this might be interesting – an older but still maintained Agora Web SDK wrapper. You should check it out here: https://github.com/AgoraIO-Community/Agora_Unity_WebGL

GitHub

WebGL plugin for Unity, beta release. Contribute to AgoraIO-Community/Agora_Unity_WebGL development by creating an account on GitHub.

fading blaze
fading blaze
fading blaze
fading blaze
# hard dagger **What is a good ressource to learn about Unity and WebGL?** > I was a Unity Dev...

Learning Unity WebGL happens from here and there for now.

Unity WebGL compiles to WebAssembly (no JS) – I was bitching about this for a long time until I start reading and understanding WebGPU.

Here a brilliant forum thread that shines some light on the topic: https://forum.unity.com/threads/webgl-roadmap-update.840544/#post-5596105

night bay
frosty mason
#

Hi I meet this errors when build WebGL (but it works when build on Windows). If anyone could help me?

hard dagger
# fading blaze Learning Unity WebGL happens from here and there for now. Unity WebGL compiles ...

thaanks, i saw this as well🥳
https://forum.unity.com/threads/new-for-webgl-in-unity-2022-1-beta.1234720/
nonetheless, for now I will stick to three js and I will keep myself uptodate.
Last year, unity got a bunch of money and normally such money tiggles down to us devs for the features that we need. At least thats my hope, because threeJs eccosystem cant compete with Unitys Eccosystem. Networking, Shaders, BuiltinControllers aand so on🐵

woven forum
woven forum
orchid bridge
safe imp
# orchid bridge Why does this looks so good though? Is that a toon shader or the assets you used...

The assets I used are aleready stylized, and I did some post process to adjust how I wanted to look ! If you want to, I can show you some screenshot :)
The assets are bought from the asset store, it's them : https://assetstore.unity.com/packages/3d/environments/fantasy/hand-painted-forest-pack-24665 pinkthumbsup

Elevate your workflow with the Hand Painted Forest Pack asset from Red panda. Find this & other Fantasy options on the Unity Asset Store.

orchid bridge
#

I tried to make a beautiful scenery for WebGL and the browser threw an out of memory error

toxic hare
#

hi, can anyone link me to recent tutorials for using VR for lets say an exhibition on a website. I found some WebXR tut from 2 yrs ago, but the content seems kinda dated

safe imp
orchid bridge
#

Do you have social media where I could see this project?

#

I clicked on the link on your profile and it led me to a cover of a song I love btw

#

I listen to kpop since 2012 🤭

safe imp
#

Yehhh, love this song ! I'm happy you like it as well ! ;D

orchid bridge
#

No problem

#

Consider making a personal social media for you personal projects. You do have great taste

#

Are you an anime fan as well?

#

I bet you can produce amazing beautiful work

safe imp
safe imp
orchid bridge
# safe imp Yup haha And you?

Yes I am. I'm currently learning toon shaders and Blender 3D so I can model anime characters and develop anime style games

safe imp
orchid bridge
#

Thank you. I'll stay in touch and show you my progress with anime style later

#

<@&502884371011731486> Nitro Scam

safe imp
frank lynx
#

!ban 206496149312372747 scam

somber questBOT
#

dynoSuccess Fenrisus#6137 was banned

safe imp
orchid bridge
#

How do I work with the cache to make my game save? I enabled that one setting but the game doesn’t save automatically like it suggests

arctic rose
#

If you mean the data caching setting, that's not what it's for

#

It caches the game files so the player doesn't need to re-download it every time. It has nothing to do with saving in-game progress or anything like that.

fading blaze
toxic hare
orchid bridge
#

Hello I am trying to run my unity3d game on local server but I am getting the error "Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings" I have been searching for a solution on the internet but I couldn't find newer versions of unity doesn't support memory allocation from the editor. I made a dev build and searching throught the framework code and I found something like "var TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 33554432;" I removed or and raised the value but it still didn't work what can I do? Any Help?

cinder creek
weak oxide
#

WebGL build wont load

#

Tried itch too

vestal cloak
#

Press Ctrl-Shift-i, click the Console tab, and look at what it says

#

then google the error if there is one

weak oxide
vestal cloak
# weak oxide All errors

If you're launching a build locally you need to use Build and Run from Unity (which launches its own local server) or use a local server like Laragon to host it. Browsers are generally very cautious about executing things locally these days and won't do it without that.

weak oxide
#

Itch has these errors

weak oxide
#

Nevermind

orchid bridge
#

how can i make my game save

#

with cache

snow fractal
#

Is there any other way to configure player settings in order to deploy hosting and make it run faster?? It's too slow when i deploy on my hosting by default config. And my file data size is 350mb

sweet oriole
# orchid bridge with cache

The site and the build should be cached to some extent by default. The way to deal with caching is the same as with any other web asset, so website caching tutorials largely apply.

static bobcat
#

Hi. My project isn’t building right. It builds the system like it is in unity player but I have a backend CMS and a lot of animation which appear when I run it. That does not happen in webGL export. I need help please

sweet oriole
static bobcat
#

They aren’t loaded so there are no animations

sweet oriole
#

Was the data fetched succesfully?

#

Did you try desktop builds?

static bobcat
sweet oriole
static bobcat
# sweet oriole Was the data fetched succesfully?

I get the following warnings in the console in a seemingly endless loop:

Singleton 'AppConfig' is accessed while in the process of being initialized due to a pending access. This suggests that there is a circular dependency where the creation of the singleton requires an instance of it to be present already. Returning null instead. 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)```
wet grail
#

!ban 543560721871667202 Scam

somber questBOT
#

dynoSuccess Blabli#6486 was banned

terse turtle
#

Is it possible to use Unity Remote 5 to test WebGL on an android smartphone?

serene summit
#

No

terse turtle
#

Are there any ways to test WebGL on mobile without building the project? Now I am building the project and testing through the browser, which is not very convenient.

outer rampart
hushed zephyr
#

Hi

#

what to do?

#

in editor I haven't errors

#

it builds without warnings: Build completed with a result of 'Succeeded' in 482 seconds (482048 ms)

hushed zephyr
#

it has something wrong with metamask I think because in incognito mode it loads correctly

terse turtle
#

How to create a WebGL template so that the canvas is stretched to the entire browser document? Or maybe there are ready-made templates?

hushed zephyr
#

my build in webgl doesn't load next scene

static bobcat
hushed zephyr
#

There is a good way to proceed to debug when build fail to fully load on webpage?

#

if I make an empty project with same build settings it works

#

but on my real project it doesn't

#

but I don't know how to solve

#

in editor there are no problems

hollow rose
high patrol
#

got the infamous /users/bokken error

#

they call the build machine the build slave? how barbaric

high patrol
#

I have a complaint. Why did they switch the build output to use .br instead of .gz?

#

I guess I'll use peazip instead since windows extraction and 7zip don't support brotli

rigid kraken
#

building it up again seemed to work

orchid bridge
#

How do I add ads to my webgl game?

sweet oriole
rigid kraken
#

quick question: how do you get webgl to stick to a certain fps
i want the fps to be 30, and it works iwthin unity
but after building it up, it doesn't
it's 60 fps instead

hushed zephyr
#

any help?

hushed zephyr
#

WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file Build/Build.wasm, but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration

hushed zephyr
#

Build.loader.js:1 wasm streaming compile failed: LinkError: WebAssembly.instantiate(): Import #508 module="a" function="xi" error: function import requires a callable

hushed zephyr
#

I cry, my fried say that the build works on his pc

#

but I don't know what fixed it

static bobcat
#

What does this mean in my Unity 2018 project?

#
error CS0246: The type or namespace name 'SerializedSingleton<>' could not be found (are you missing a using directive or an assembly reference?)
hushed zephyr
#

you miss a file where the class is defined

#

Debug Symbol should be Embedded or External?

high patrol
#

is there a way to do async/await in webgl?

#

technically with async Task and await, it's still operating on a single thread, but it still utilizes the System.Threading namespace, so I would assume it would not cross compile

flint carbon
#

any way we can use voice chat in wegl apps

#

ive created a webgl multiplayer game but need voice chat

#

photon voice doesnt support webgl builds

#

is there any way i can get voice chat into my webgl app

zenith mason
#

Hello guys. I have a Z-fighting problem, but only in WebGL build. Editor works fine. What I have is 2 planes. One plane is at Y = 0.0001, the second plane is at Y = 0.001. When I move the camera higher the Z-fighting occurs, but only on webGL. How can I deal with that? The near clip and far clip planes distance I cannot change unfortunately. They are already at minimum range I have to support. I have near plane = 0.08 and far plane = 110.

winged rune
#

Anyone know what to do to get a webgl game to connect to an external server? I even got my web host support to look at the back logs and there was no error we could go off of. It loads the login screen no problem but when you try to login or create an account it just sits there connecting.

surreal bear
#

Any known fixes for mesh rendering issues on WebGL? I've tried the same project on Standard and URP. It's a procedurally generated mesh. All objects (apart from the player) find the mesh collider and correctly populate it, but it doesn't render. Has to be WebGL for an assignment hand in. Everything works perfectly on the PC build. Very frustrating!

static bobcat
hushed zephyr
#

check the cs file, you will find a section inside #if block

#

surely there is a reason if it is excluded for webgl

sweet oriole
sweet oriole
sweet oriole
flint carbon
#

Is any other alternate other than the plugin

#

I need help with unity photon to switch between scenes

sweet oriole
sweet oriole
flint carbon
#

I tried searching but couldn't find anything

#

I've been asking on networking

#

But no one's really responding

sweet oriole
#

Try Photon's official discord server

#

Unanswered questions generally just lack the detail to answer them, and the most effort tends to go towards just getting the appropriate information to answer the question.

high patrol
#

The project I opened from it has a sandbox main that is ~1100 lines of messiness

sweet oriole
#

His other mess is worth checking out too

high patrol
#

MagicOnion lol

#

oh my god, I already spent a month implementing basically that

flint carbon