react-unity-webgl-template: Module '"react-unity-webgl"' has no exported member 'UnityContext'.
qld-cf 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?
When the Unity App is running
What does your problem relate to?
The problem seems Module related
React-Unity-WebGL Version
8.1.0
React Version
16.0.0
Unity Version
latest
What happened?
Repositories : https://github.com/jeffreylanters/react-unity-webgl-template/
run:
npm i npm start
result:
Module '"react-unity-webgl"' has no exported member 'UnityContext'. TS2305
1 | import "./app.css";
2 | import { Fragment, useEffect, useState } from "react";
3 | import Unity, { UnityContext } from "react-unity-webgl";
| ^
4 |
5 | interface Vector2 {
6 | x: number;
Repositories : https://github.com/jeffreylanters/react-unity-webgl-template/
Reproducible test case
import Unity, { UnityContext } from "react-unity-webgl";
Would you be interested in contributing a fix?
- yes, I would like to contribute a fix
It seems that the new package does not maintain UnityContext, hope to update the templates, thanks
Hi! Sorry, the template is not updated for version 9.x yet. I will update it as soon as possible! For both the documentation version 8.x and 9.x you can head over to the official website.
Happy coding!
@jeffreylanters
i try to create a pr;
jeffreylanters/react-unity-webgl-template#58
@jeffreylanters
i try to create a pr;
jeffreylanters/react-unity-webgl-template#58
@jeffreylanters
i try to create a pr;
jeffreylanters/react-unity-webgl-template#58