From ed5134f7ecac099e12eb7c03642f392ff78175f2 Mon Sep 17 00:00:00 2001 From: sjwie Date: Mon, 15 Apr 2024 16:32:56 +0900 Subject: [PATCH] css minor fix --- app/unity/page.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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 라이브러리를 통해 실행했다. -
+
{isLoaded === false && ( -
+

Loading... ({loadingPercentage}%)

)} - {initialisationError && JSON.stringify(initialisationError, null, 2)} - -
+ +