jeffreylanters / react-unity-webgl

React Unity WebGL provides a modern solution for embedding Unity WebGL builds in your React Application while providing advanced APIs for two way communication and interaction between Unity and React.

Home Page:https://react-unity-webgl.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Very slow loading times on production server

alexisdavidson opened this issue · comments

Please avoid duplicates

Language and Compiler

Vanilla JavaScript

What environment are you using?

Static File Serving

When does your problem occur?

While the Unity App is loading

What does your problem relate to?

The problem seems Unity related

React-Unity-WebGL Version

9.0.3

React Version

17.0.2

Unity Version

2021.3.3f1

What happened?

On my local machine, le loading is very fast and almost instantaneous.
Now I uploaded everything on a ubuntu server and everything works but the loading is now extremely slow at times (not always the same).
Are the game files not cached?
is 70 MB huge for a game?

Reproducible test case

No response

Would you be interested in contributing a fix?

  • yes, I would like to contribute a fix

Hi. Caching is completely depending on your server's configuration. 70mb is quite big for a WebGL build, but it depends on it's purpose. I would recommend keeping it under around 30mb.

I hope this helps! Happy coding.