File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,23 @@ import { UnityProvider } from "../types/unity-provider";
66const useUnityContext = ( unityConfig : UnityConfig ) : UnityContext => {
77 const [ loadingProgression , setLoadingProgression ] = useState ( 0 ) ;
88 const [ isLoaded , setIsLoaded ] = useState ( false ) ;
9+ const [ initialisationError , setInitialisationError ] = useState < Error > ( ) ;
910
1011 const unityProvider = useRef < UnityProvider > ( {
1112 codeUrl : unityConfig . codeUrl ,
1213 dataUrl : unityConfig . dataUrl ,
1314 frameworkUrl : unityConfig . frameworkUrl ,
1415 loaderUrl : unityConfig . loaderUrl ,
15- setLoadingProgression : setLoadingProgression ,
16- setIsLoaded : setIsLoaded ,
16+ setLoadingProgression,
17+ setIsLoaded,
18+ setInitialisationError,
1719 } ) ;
1820
1921 return {
2022 unityProvider : unityProvider . current ,
2123 loadingProgression,
2224 isLoaded,
25+ initialisationError,
2326 } ;
2427} ;
2528
You can’t perform that action at this time.
0 commit comments