본문 바로가기
개발/Unity

문제해결)Failed to download file Build/WebBuild.data. Loading web pages via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host Unity content, or use the Unity Build and Run option.

by 테샤르 2025. 8. 18.

Unity Web Build 오류 해결

 

Failed to download file Build/WebBuild.data. Loading web pages via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host Unity content, or use the Unity Build and Run option. 

 

 

Unity Web Build 이후의 index.html을 단순 클릭해서 실행할때 오류나는 항목이다.

반응형

 

< 1. 해결방법 >

Unity 에서 Buind & Run 

Unity 에서 자동으로 로컬 서버를 띄어서 자동으로 브라우저에 열어준다.

 Unity 설치 폴더 ~ Editor\Data\PlaybackEngines

 

< 2. 해결방법 >

Python의 내장 서버로 실행

# 터미널/PowerShell에서 빌드가 들어있는 폴더로 이동 (index.html 있는 폴더)

cd /path/to/your/webgl-build-folder
python -m http.server 8080

 

브라우저에서 http://localhost:8080 접속

빌드 설정 (Project Setting - Player - Decompression Fallback - 체크 / Compress 옵션 Disable)

 

★☆☆☆☆

 

반응형

댓글