Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

WebGL game slows down after triggering javascript event

$
0
0
I am using Unity WebGL to host my game on a flask server and trying to throw a warning to the user whenever he tries to navigate away from the tab or mistakenly click browser's back button. Each time after the event is triggered (whenever I try to navigate away) the game slows down with a huge drop in frame rate (navigation has to be performed after the game has been loaded properly by showing the unity logo and other stuffs). Here is the script that I am using to trigger the event: What is the work-around of this problem and why the game slows down completely? (I checked with firefox and chrome both !)

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>