I embedded WebGL game to Next.js website. This is the error that shows in the console and the game does not load.
Here is the actual game embed:
Here is my File structure:
I am trying to use Iframes to embed the game, here is my page:
import React from 'react'
const Test = () => {
return (
<div className='w-full h-full flex flex-col items-center justify-center'>
<h1>
Untiy GAme
</h1>
<iframe src="/Game/index.html"
width="960"
height="600"
allowFullScreen
title="Unity WebGL Game"></iframe>
</div>
)
}
export default Test
The website itself is hosted on cloud flare.
Thank you for your help!
New contributor
Arthur Kaza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.