- Home /
How to load the unity content on button click ?
In webGL build I have created a progress bar and a button on html page,once the progress bar is full the button will appear. On clicking the button the unity content should load.
But, Once the progress bar is full the unity content is running in background. How to control loading of the unity content on button click??
Answer by TheonlysiQ · Sep 21, 2020 at 11:50 AM
Have a look at this:
https://docs.unity3d.com/ScriptReference/Time-timeScale.html
Set timeScale to 0 - It will cause the time inside the game to stop running, essentially pausing everything. Setting it to 1 will resume the game. So you can toggle it to 0 when the progress bar is done, and back to 1 when the user clicks on it
Your answer
Follow this Question
Related Questions
Embed Unity Webgl game to wix website 1 Answer
creating a multiple choice game 1 Answer
embedding light html5 project in an email 0 Answers