diff --git a/app/unity/page.tsx b/app/unity/page.tsx index 2d888e8..974ac05 100644 --- a/app/unity/page.tsx +++ b/app/unity/page.tsx @@ -1,8 +1,8 @@ "use client"; import Image from "next/image"; import { useSearchParams } from "next/navigation"; +import { Suspense } from "react"; import { Unity, UnityConfig, useUnityContext } from "react-unity-webgl"; - const unityConfigBuilder: (path: string) => UnityConfig = (path) => ({ loaderUrl: `${path}.loader.js`, dataUrl: `${path}.data`, @@ -19,7 +19,7 @@ const option = [ { value: "/unity/test-project/build", name: "test-project" }, ]; -export default function Home() { +function UnityComponent() { const params = useSearchParams(); const p = params.get("p"); console.log(p); @@ -41,15 +41,14 @@ export default function Home() { 새 Unity 프로젝트를 생성하고, WebGL로 빌드 후 빌드 산출물을 react-unity-webgl 라이브러리를 통해 실행했다. -
Loading... ({loadingPercentage}%)