.br files in release build #153
-
I can only get my project to work with development builds in Unity. When unchecking "Development Build", the files are compressed into .br files for the release (in the Build folder). Is there any way to get these files to work with React-Unity? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello. This is unrelated to the module, but I can help you anyhow. The .br file you're referring to are in fact the same files as the JavaScript and JSON files shown in the examples and the readmes, and the files generated when having "Development Build" checked - but are compressed using the Brotli compression algorithm. The module does support any kind of compression, but it is up to you to handle these compression types on the server. To the module, and your browser, all of these files are the same whether they are decompressed or not compressed at all. If you want Unity to generate the regular uncompressed JavaScript and JSON files, you can change this behaviour in your Unity Project's build settings. You can find these settings in the following menu:
Another approach would be to enable or add support for these compression methods on your server's end. You might need to adjust your server configuration to match your specific build setup. In particular, there might be issues if you already have another server-side configuration to compress hosted files, which could interfere with this setup. To make the browser perform decompression natively while it downloads your application, append a Content-Encoding header to the server response. This header must correspond to the type of compression Unity uses at build time. For code samples, see Server Configuration Code Samples. For more details about WebGL deploying I recommend heading over to Unity's documentation. I hope this helps you, best of luck with your project! |
Beta Was this translation helpful? Give feedback.
Hello. This is unrelated to the module, but I can help you anyhow. The .br file you're referring to are in fact the same files as the JavaScript and JSON files shown in the examples and the readmes, and the files generated when having "Development Build" checked - but are compressed using the Brotli compression algorithm. The module does support any kind of compression, but it is up to you to handle these compression types on the server. To the module, and your browser, all of these files are the same whether they are decompressed or not compressed at all.
If you want Unity to generate the regular uncompressed JavaScript and JSON files, you can change this behaviour in your Unity Project'…