Claude-skill-registry 32-example-webgl-server
32-example-webgl-server — Unity WebGL 서버 가이드
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/32-example-webgl-server" ~/.claude/skills/majiayu000-claude-skill-registry-32-example-webgl-server && rm -rf "$T"
manifest:
skills/data/32-example-webgl-server/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- references .env files
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
32-example-webgl-server — Unity WebGL 서버 가이드
Status: ACTIVE AppliesTo: v10 Type: GUIDE
Scope
UnityExample WebGL 빌드 → NestJS(WebGLServer)로 로컬 서빙 → 브라우저 스모크 테스트
SSOT Paths
| 구분 | 경로 |
|---|---|
| Unity project | |
| WebGL build output (default) | |
| NestJS server app | |
| 환경변수 정의 (SSOT) | |
| .env.example (자동 생성) | |
Build Steps (Unity)
- Unity Editor에서
프로젝트 열기framework-cs/apps/UnityExample - File → Build Settings
- Platform: WebGL 선택 → Switch Platform
- Development Build: On (스모크 테스트 동안)
- Build 클릭 → 출력 경로:
output/unity-webgl/UnityExample/
Run Steps
Step 1: (권장) GameServer 실행
cd framework-ts npm ci npm -w game-server run start
Step 2: WebGL 정적 서버 실행
cd framework-ts npm -w webgl-server run start:dev
Step 3: 브라우저 접속
http://localhost:8081/
Environment Variables
SSOT:
→env.spec.json는 자동 생성 (수동 편집 금지).env.example환경변수 변경 시:
수정 →env.spec.jsonnpm -w webgl-server run env:sync
| 변수 | 기본값 | 설명 |
|---|---|---|
| | WebGL 빌드 출력 경로 |
| | 서버 포트 (1..65535) |
# .env.example 생성/갱신 npm -w webgl-server run env:sync # 기본 실행 cd framework-ts npm -w webgl-server run start:dev # 포트 지정 cd framework-ts WEBGL_PORT=8091 npm -w webgl-server run start:dev # 루트+포트 지정 cd framework-ts WEBGL_ROOT=output/unity-webgl/UnityExample WEBGL_PORT=8091 npm -w webgl-server run start:dev
Smoke Checklist
| 항목 | 확인 |
|---|---|
| 로딩/씬 진입 OK | [ ] |
console error 0 (특히 , , , ) | [ ] |
| (권장) WS 연결 성공 (서버 로그 + 브라우저 로그) | [ ] |
DoD (Definition of Done)
- WebGL 로딩 성공, 씬 진입
- 브라우저 콘솔 치명 에러 0
-
설정 시 해당 포트로 기동 확인WEBGL_PORT - (권장) WS 연결 확인:
- 서버 로그에 connect 흔적
- 브라우저에서 연결 성공 로그 또는 게임 UI에 연결 표시
Hard Rules
- WebGL은 반드시 HTTP 서버로 서빙한다 (파일 직접 열기 금지)
- 로컬 서빙은 NestJS(WebGLServer)를 표준으로 사용한다
- DoD는 "빌드 성공"이 아니라 브라우저 로드 + 콘솔 에러 0까지 포함한다
Server Features
- Port:
(기본값 8081)WEBGL_PORT - Static serving:
폴더 정적 서빙WEBGL_ROOT - SPA fallback: 정적 파일 없으면
로 fallbackindex.html - MIME types:
,.wasm
,.data
,.gz
헤더 자동 설정.br - Validation:
없으면 명확한 에러 메시지 후 종료index.html
Related
- 30-example-network-server — Game Protocol TS 서버 예제
- 31-example-network-client — Game Protocol TS 클라이언트 예제
- 03-ssot — Example Apps SSOT
- 30-env-management — 환경변수 관리 정책