All useState hooks block work of setFullScreen.
sanscrid6 opened this issue · comments
I added useState hook to my project and setFullScreen function stopped work. It just dont wont to set full screen.
I added this and fullscreen crushed
useEffect(function () {
unityContext.on("progress", function (progression) {
console.log(progression);
setProgress(progression);
}
);
}, []);
You're probably recreating the UnityContext object somewhere. Could you try creating the UnityContext inside of a UseEffect hook as an ComponentDidMount effect, or outside of the competent at all? Let me know if this helps.
I just use browser fullscreen api instead of unity context setFullscreen function and it works.
Could you provide an example of what you did? Thanks
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.