Error occurred when going backwards (getBoundingClientRect) #434
Unanswered
devilofdev
asked this question in
Help Wanted!
Replies: 2 comments 2 replies
-
i modify my code, after unity instantiate is completed, backward event is well done. my modify code const handleUnload = useCallback(async () => {
await unload();
router.push("/space");
}, [router, unload]);
useEffect(() => {
router.beforePopState(({ as }) => {
if (as !== router.asPath) {
if (isLoaded) {
handleUnload();
return false;
} else {
return true;
}
} else {
return true;
}
});
return () => {
router.beforePopState(() => true);
};
}, [handleUnload, router, isLoaded, removeEventListener]); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello. (I am not good at English.) I have the same error. I modified 1149 lines in the framework.js file in the build file, so this error does not occur. It seems to be a temporary settlement. Please recommend a better way.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. i'm Stephen. Thanks to you, I am working hard to develop the service. :)
a getBoundingClientRect error occurs if you go back from the page where the Unity instance is activated.
So before running the Backward event, I'm going to unload it.
Sometimes it works, but sometimes it doesn't work when you enter a page that brings up another scene.
below is my code.
can i get some help? n_n
Beta Was this translation helpful? Give feedback.
All reactions