Cannot manage to make it work... #238
-
Hi all, Sorry for the very non-precise title, I couldnt figure a better one. Anyway, I've followed the very basic step with Unity 2020.3.18f1 and the react-unity-webgl lib:
As the PC crashed, I couldnt take a screenshot but managed to take a picture, sorry for the horrible quality 😅 Here's the repo: https://github.com/KevTale/react-unity-webgl Note: the unity project works fine when doing Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
return ( <Unity unityContext={unityContext} style={{ width: "640px", height: "480px" }} /> ); } ^^^ I had the same problem you are describing. I added the style line to address it. |
Beta Was this translation helpful? Give feedback.
-
Hi. Sorry for my late response. Does your Unity WebGL build work outside of React? You can try this by going into Unity, switching the WebGL build platform en selecting |
Beta Was this translation helpful? Give feedback.
return (
<Unity
unityContext={unityContext}
style={{ width: "640px", height: "480px" }}
/>
);
}
^^^ I had the same problem you are describing. I added the style line to address it.