Skip to content

Commit

Permalink
Merge pull request #38 from finol-digital/develop
Browse files Browse the repository at this point in the history
Add reload button
  • Loading branch information
davidmfinol authored Nov 6, 2023
2 parents a7aa31d + 751fd76 commit 0643755
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions components/unityWeb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ export default function UnityWeb({
[devicePixelRatio],
);

// if (isLoaded === true) {
// sendMessage("CardGameManager", "StartGetCardGame", url);
// }

return (
<div style={{ width: "100%", height: "100%" }}>
{!isLoaded && (
<p>Loading CGS... {Math.round(loadingProgression * 100)}%</p>
)}
{isLoaded && (
<button
onClick={() =>
sendMessage("CardGameManager", "StartGetCardGame", url)
}
>
Reload
</button>
)}
<Unity
unityProvider={unityProvider}
style={{
Expand Down

0 comments on commit 0643755

Please sign in to comment.