File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import { Fragment, useState } from "react";
22import { Unity , useUnityContext } from "../../module/source/exports" ;
33
44export function Application ( ) {
5- const [ isMounted , setIsMounted ] = useState ( false ) ;
5+ const [ isMounted , setIsMounted ] = useState ( true ) ;
66
7- const { unityProvider } = useUnityContext ( {
7+ const { unityProvider, loadingProgression } = useUnityContext ( {
88 codeUrl : `/unity-build/unity.wasm` ,
99 dataUrl : `/unity-build/unity.data` ,
1010 frameworkUrl : `/unity-build/unity.framework.js` ,
@@ -17,10 +17,12 @@ export function Application() {
1717 < button onClick = { ( ) => setIsMounted ( ( prev ) => ! prev ) } >
1818 { isMounted ? "Unmount Unity" : "Mount Unity" }
1919 </ button >
20+ < p > Loading Progression: { loadingProgression } %</ p >
21+ < br />
2022 { isMounted && (
2123 < Unity
2224 unityProvider = { unityProvider }
23- style = { { width : 400 , height : 250 } }
25+ style = { { width : 400 , height : 350 } }
2426 />
2527 ) }
2628 </ Fragment >
You can’t perform that action at this time.
0 commit comments