> For the complete documentation index, see [llms.txt](https://ton-play-1.gitbook.io/ton-play-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ton-play-1.gitbook.io/ton-play-1/game-set-up/unity/unity-webgl.md).

# Unity WebGL

Talking about optimizing your WebGL, we have a few recommendations to follow:

* Don’t use async methods for WebGL; it’s better to use Coroutines.
* Use Unity WebRequests or any plugins which are based on it.
* The project structure is particularly the same as for mobile.
* Please, take a look at the game size. It should be no more than 256 MB.
* Even if you have a compressed project that unzips and uploads resources in the browser, exceeding this size is still not recommended. Otherwise, there will be problems with iOS (they don’t guarantee that they can completely allocate a piece of memory in real time of more than 256 MB)
* Shaders are not all displayed correctly in WebGL, and you need to be prepared for this.
* Textures should be strictly folded into atlases or powers: ex 2 (64*64, 128*128, 256\*256...)
