Update deprecated code inside jslib plugins #234
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In the WebGL build of Unity 2023 and above, when enabling the "Target WebAssembly 2023" option in Player Settings > Publishing Settings, the game freezes after the initial loading.
Solution
According to the Unity documentation at the link below:
https://docs.unity3d.com/6000.0/Documentation/Manual/web-interacting-browser-deprecated.html#dyncall
the dynCall() function has been deprecated and should be replaced with makeDynCall().
Please note that this change is backward-compatible, and there will be no issues even if the "Target WebAssembly 2023" option is not enabled.
As a result, I replaced this deprecated function with the new version in all the existing jslib plugins in your SDK, and ultimately, the issue with my build in Unity 6 was resolved when "Target WebAssembly 2023" was enabled.
Other changes (e.g. bug fixes, small refactors)
Also, the allocate function was used in the WebGLInput plugin, which has also been deprecated, and I replaced it with its new equivalent.