Unloading issue #399
Replies: 3 comments 5 replies
-
I also have a similar issue. Does it give you the error when using development build? it solved it for me. |
Beta Was this translation helpful? Give feedback.
-
Hi, unloading problems are a known issue in later Unity versions #250. This is a problem with the actual webgl build, so there is not much we can do except with for unity to fix it. |
Beta Was this translation helpful? Give feedback.
-
i solved null check at _JS_DOM_MapViewportCoordinateToElementLocalCoordinate in .framework.js. in my case, variable canvas was null when unity page in or out. |
Beta Was this translation helpful? Give feedback.
-
Hello!
Everything works fine, but for about two weeks I can’t solve one problem.
The problem occurs when I am navigating away from the page, and it seems after all the game still works behind th scene. My guess is that it wasn’t properly unloaded. It’s only terminated when page is refreshed or navigated in old fashioned way.
I tried to use react’s useEffect hook to recognize when user is leaving the page (component is removed) but when I do, unload() function tells that unity game wasn’t instantiated (the game music still plays in the background anyway).
I wouldn’t like to solve this problem the tricky way by using seperate page for the game as purpose of React is to work as a single page application.
Thank you for all the answers in advance
.
Beta Was this translation helpful? Give feedback.
All reactions