Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Support Decompression Fallback in WebGL #11

Closed
ULE7 opened this issue Nov 22, 2023 · 16 comments · Fixed by #18
Closed

[REQUEST] Support Decompression Fallback in WebGL #11

ULE7 opened this issue Nov 22, 2023 · 16 comments · Fixed by #18
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ULE7
Copy link

ULE7 commented Nov 22, 2023

So I turn on the splash logo at 2020.1.0 and made a webgl package, the USSR looked worked fine, However when I tried to open this webgl program it got stuck somehow, and never entered inside program. By the way I am using 1.1.5 USSR, already choose "All Sequential".
I also tried 2022.3.0 unity it turns the same. I noticed I have marked "Decompression fallback" true in Player setting/Publishing setting which generate the .unityweb file instead of .gz files(gz is unusable for me). Seriously, I tried a lot times in different version of Unity, and never saw this USSR actually working even for once.........

@kiraio-moe
Copy link
Owner

Don't tick Decompression Fallback, currently it's not supported.

How about using Brotli compression? Did it work? If not, check the browser console for the error cause. You can also send the console screenshot and the *.data file here so I can experiment with it.

@kiraio-moe kiraio-moe added the enhancement New feature or request label Nov 22, 2023
@kiraio-moe kiraio-moe changed the title Unable open webgl program after using USSR [REQUEST] Support Decompression Fallback in WebGL Nov 22, 2023
@ULE7
Copy link
Author

ULE7 commented Nov 23, 2023

1
I don't know how to use gz file actually(Not familiar with webgl stuff). My company demand all program must pack by form Decompression Fallback + Gzip otherwise it will not work. Also my computer can not open any webgl program directly somehow......
web.zip

@kiraio-moe
Copy link
Owner

The game loaded successfully, although the splash screen are still there.

@kiraio-moe
Copy link
Owner

It's now fixed in #12. You can download the latest release, although the decompression fallback are still not supported.
Will be added in the future.

@ULE7
Copy link
Author

ULE7 commented Nov 25, 2023

Build.zip
image
Thanks for your remarkable work, but I can not open .gz program(screenshot) so I have to put here. This is the folder after I using USSR 1.1.6.

@kiraio-moe
Copy link
Owner

Use a local web server. Don't directly put it in the browser.
You can use Unity built-in web server in YourUnityInstallation/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/SimpleWebServer.exe. Run and it will show how to use the tool.

@kiraio-moe
Copy link
Owner

Oh, after you removed the splash screen, there will be a folder contains the decompressed WebGL data. I forgot to uncomment the code that will automatically remove them 😋

@kiraio-moe kiraio-moe added the help wanted Extra attention is needed label Nov 27, 2023
@ULE7
Copy link
Author

ULE7 commented Nov 27, 2023

使用本地 Web 服务器。不要直接放在浏览器中。您可以在 中使用 Unity 内置的 Web 服务器。运行,它将显示如何使用该工具。YourUnityInstallation/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/SimpleWebServer.exe

Thanks but can not open this exe lol

@kiraio-moe
Copy link
Owner

Thanks but can not open this exe lol

Use this: https://uusoft.itch.io/unity-webgl-local-hoster
There will be an error at the startup, just continue.

@ULE7
Copy link
Author

ULE7 commented Nov 27, 2023

Wow this time it worked! However I believe the USSR is not working, instead it add the splash screen into the program. For example this is a program I pack it without the splash image (unity2020.1.0 cracked versio
Build.zip
n) it runs very good, after I use USSR on this program and open by webgl-local-hoster somehow the splash screen appear.

@kiraio-moe
Copy link
Owner

kiraio-moe commented Nov 27, 2023

Wow this time it worked! However I believe the USSR is not working, instead it add the splash screen into the program. For example this is a program I pack it without the splash image (unity2020.1.0 cracked versio Build.zip n) it runs very good, after I use USSR on this program and open by webgl-local-hoster somehow the splash screen appear.

There's no code to add splash screen whatsoever, instead it's check if there's any splash screen present. In my local changes, if there's only 1, it will auto-remove it.

Have you tried clearing the site data?

@ULE7
Copy link
Author

ULE7 commented Nov 27, 2023

Ok I know whats going on , because I am using a cracked unity version which makes the USSR fail to do its job. After I switch to 2022.3.0, everything runs fine. Thanks again bro, looking forward to the decompression fallback support !😋

@kiraio-moe
Copy link
Owner

Ok I know whats going on , because I am using a cracked unity version which makes the USSR fail to do its job. After I switch to 2022.3.0, everything runs fine. Thanks again bro, looking forward to the decompression fallback support !😋

Yeah, I hope there's no any complicated problems while implementing it.

@kiraio-moe
Copy link
Owner

Ok, I have understand.
Decompression Fallback will produce .unityweb file which basically the same as UnityWebData (.data) file.
And if you use either GZip or Brotli compression, it's just GZip or Brotli file, but with custom file header.

@ULE7
Copy link
Author

ULE7 commented Dec 1, 2023

Its "XXX.data.unityweb", so what does this mean?
VJBU}D4JWE1W)RY1F LRG

@kiraio-moe
Copy link
Owner

Support added in #18! Fiuh~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants