React router
lolik20 opened this issue · comments
Please avoid duplicates
- I checked all open issues and discussions and none of them matched my problem.
Language and Compiler
Other JavaScript compiler
What environment are you using?
Local Development Server
When does your problem occur?
I don't know
What does your problem relate to?
The problem seems Module related
React-Unity-WebGL Version
last
React Version
15
Unity Version
last
What happened?
I have react router and i want add webgl game on page
Reproducible test case
import style from "./game.module.css"
import React from "react";
import loaderUrl from "./Build/build.loader.js"
import dataUrl from "./Build/build.data.br"
import frameworkUrl from "./Build/build.framework.js.br"
import codeUrl from "./Build/build.wasm.br"
import { Unity, useUnityContext } from "react-unity-webgl";
export default function Game (){
const { unityProvider } = useUnityContext({
loaderUrl: loaderUrl,
dataUrl:dataUrl,
frameworkUrl: frameworkUrl,
codeUrl: codeUrl
});
return(
< div className={style.container}>
< Unity unityProvider={unityProvider} />
< /div>
);
Would you be interested in contributing a fix?
- yes, I would like to contribute a fix
you should put your Build in public folder.