Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:19:28 +08:00
commit 1da7b24c8e
254 changed files with 43797 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b4c10a7eebeca8a48add5452431f3936
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

View File

@@ -0,0 +1,189 @@
# Third-Party Dependencies
Unity Editor Toolkit에서 사용하는 외부 라이브러리 목록 및 설치 가이드입니다.
## 📦 현재 포함된 라이브러리
### 1. websocket-sharp
- **용도**: Unity Editor ↔ CLI WebSocket 통신
- **버전**: 포함됨
- **위치**: `ThirdParty/websocket-sharp/`
## 🆕 PostgreSQL DB 기능을 위해 추가 필요한 라이브러리
### 2. Npgsql (PostgreSQL .NET Driver)
- **용도**: Unity에서 PostgreSQL DB 연결
- **버전**: 6.x (권장: 6.0.11)
- **다운로드**: [NuGet Gallery - Npgsql](https://www.nuget.org/packages/Npgsql/)
- **설치 위치**: `ThirdParty/Npgsql/`
#### Npgsql 설치 단계:
**Option 1: NuGet Package Explorer 사용 (추천)**
1. NuGet Package Explorer 다운로드: https://github.com/NuGetPackageExplorer/NuGetPackageExplorer/releases
2. NuGet Package Explorer 실행
3. `File > Open Package from Online Feed...`
4. "Npgsql" 검색, 버전 6.0.11 선택
5. 오른쪽 패널에서 `lib/netstandard2.1/` 폴더 확인
6. 다음 DLL 파일들을 `ThirdParty/Npgsql/` 폴더에 복사:
- `Npgsql.dll`
- `System.Buffers.dll`
- `System.Memory.dll`
- `System.Runtime.CompilerServices.Unsafe.dll`
- `System.Threading.Tasks.Extensions.dll`
**Option 2: NuGet CLI 사용**
```bash
# NuGet 설치
dotnet tool install --global NuGet.CommandLine
# Npgsql 다운로드
cd ThirdParty
mkdir Npgsql
cd Npgsql
nuget install Npgsql -Version 6.0.11 -Framework netstandard2.1
# DLL 파일 복사
cp Npgsql.6.0.11/lib/netstandard2.1/*.dll ./
cp System.Buffers.*/lib/netstandard2.1/*.dll ./
cp System.Memory.*/lib/netstandard2.1/*.dll ./
cp System.Runtime.CompilerServices.Unsafe.*/lib/netstandard2.1/*.dll ./
cp System.Threading.Tasks.Extensions.*/lib/netstandard2.1/*.dll ./
# 임시 폴더 삭제
rm -rf Npgsql.6.0.11/ System.Buffers.*/ System.Memory.*/ System.Runtime.CompilerServices.Unsafe.*/ System.Threading.Tasks.Extensions.*/
```
**Option 3: 수동 다운로드**
1. https://www.nuget.org/packages/Npgsql/6.0.11 접속
2. 오른쪽 "Download package" 클릭
3. `.nupkg` 파일을 `.zip`으로 이름 변경
4. 압축 해제
5. `lib/netstandard2.1/` 폴더의 DLL 파일들을 `ThirdParty/Npgsql/`에 복사
#### 최종 폴더 구조:
```
ThirdParty/
├── Npgsql/
│ ├── Npgsql.dll
│ ├── Npgsql.dll.meta (Unity가 자동 생성)
│ ├── System.Buffers.dll
│ ├── System.Buffers.dll.meta
│ ├── System.Memory.dll
│ ├── System.Memory.dll.meta
│ ├── System.Runtime.CompilerServices.Unsafe.dll
│ ├── System.Runtime.CompilerServices.Unsafe.dll.meta
│ ├── System.Threading.Tasks.Extensions.dll
│ └── System.Threading.Tasks.Extensions.dll.meta
└── websocket-sharp/
└── (기존 파일들)
```
---
### 3. UniTask (Unity 비동기 프로그래밍)
- **용도**: 데이터베이스 비동기 작업 (DB 쿼리 시 Unity Main Thread 블로킹 방지)
- **버전**: 2.x (권장: 2.5.4)
- **다운로드**: [GitHub - UniTask](https://github.com/Cysharp/UniTask/releases)
- **설치 위치**: `ThirdParty/UniTask/`
#### UniTask 설치 단계:
**Option 1: Unity Package Manager (Git URL) - 추천**
1. Unity Editor 메뉴: `Window > Package Manager`
2. 왼쪽 상단 `+` 버튼 클릭
3. `Add package from git URL...` 선택
4. 입력: `https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask`
5. `Add` 클릭
**Option 2: .unitypackage 다운로드**
1. https://github.com/Cysharp/UniTask/releases 접속
2. 최신 릴리즈의 `UniTask.{version}.unitypackage` 다운로드
3. Unity Editor에서 `Assets > Import Package > Custom Package...`
4. 다운로드한 `.unitypackage` 선택
5. Import
**Option 3: 수동 DLL 추가 (고급)**
1. https://github.com/Cysharp/UniTask/releases 접속
2. Source code (zip) 다운로드
3. `src/UniTask/Assets/Plugins/UniTask/Runtime/` 폴더에서 `UniTask.dll` 복사
4. `ThirdParty/UniTask/` 폴더에 붙여넣기
#### 최종 폴더 구조 (Option 3 사용 시):
```
ThirdParty/
├── UniTask/
│ ├── UniTask.dll
│ └── UniTask.dll.meta
├── Npgsql/
│ └── (상기 DLL 파일들)
└── websocket-sharp/
└── (기존 파일들)
```
---
## ✅ 설치 확인
1. Unity Editor 재시작
2. `Console` 탭에서 DLL 로딩 에러 확인
3. 메뉴: `Tools > Unity Editor Toolkit > Server Window`
4. Database 탭 확인 (Phase 1 완료 후 표시됨)
---
## 🔧 문제 해결
### DLL 충돌 에러
```
Assembly 'Npgsql' has already been loaded from a different location.
```
**해결:**
1. Unity 프로젝트의 `Packages/` 폴더에서 중복 Npgsql 제거
2. `Library/ScriptAssemblies/` 삭제
3. Unity Editor 재시작
### .NET Standard 2.1 호환성 에러
```
The type or namespace name 'System.Buffers' could not be found
```
**해결:**
1. Unity 2020.3 이상 사용 확인
2. `Edit > Project Settings > Player > Other Settings`
3. `Api Compatibility Level`: `.NET Standard 2.1` 선택
4. Unity Editor 재시작
### UniTask 중복 에러
```
Multiple precompiled assemblies with the same name UniTask.dll
```
**해결:**
- Option 1 (UPM) 사용 시 Option 3 (수동 DLL) 제거
- 또는 반대
---
## 📚 참고 문서
- [Npgsql Documentation](https://www.npgsql.org/doc/index.html)
- [UniTask Documentation](https://github.com/Cysharp/UniTask)
- [Unity .NET Profile Support](https://docs.unity3d.com/Manual/dotnetProfileSupport.html)
---
**최종 업데이트**: 2025-11-14
**Phase**: 1 (인프라 구축)

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e5836215672ca474cba0379db01536cf
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5b74beeffe875aa44af781a510831573
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 04cc5304143d4e14c8258192e80b09a2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,168 @@
# websocket-sharp DLL Installation
Unity Editor Toolkit requires websocket-sharp for WebSocket communication.
## Installation Steps
### Step 1: Download websocket-sharp
**Option A: Download Pre-built DLL (Recommended)**
1. Go to: https://github.com/sta/websocket-sharp/releases
2. Download the latest release (e.g., `websocket-sharp.zip` or `websocket-sharp.dll`)
3. Extract if needed
**Direct Download Link:**
- Latest stable: https://github.com/sta/websocket-sharp/releases/download/1.0.3-rc11/websocket-sharp.dll
**Option B: Build from Source**
```bash
git clone https://github.com/sta/websocket-sharp.git
cd websocket-sharp/websocket-sharp
# Build with your C# compiler or Visual Studio
```
### Step 2: Add DLL to Unity Project
**Copy the DLL to this exact location:**
```
Packages/com.devgom.unity-editor-toolkit/ThirdParty/websocket-sharp/websocket-sharp.dll
```
**Full Path Examples:**
**Windows:**
```
D:\YourUnityProject\Packages\com.devgom.unity-editor-toolkit\ThirdParty\websocket-sharp\websocket-sharp.dll
```
**macOS/Linux:**
```
/Users/YourName/UnityProjects/YourProject/Packages/com.devgom.unity-editor-toolkit/ThirdParty/websocket-sharp/websocket-sharp.dll
```
### Step 3: Configure Import Settings in Unity
1. Unity will automatically detect the DLL
2. Select `websocket-sharp.dll` in Project window
3. In Inspector, verify settings:
- **Any Platform**: ✓ Checked
- **Editor**: ✓ Include
- **Standalone**: ✗ Exclude (Editor only)
4. Click **Apply**
### Step 4: Verify Installation
**Method 1: Check Console**
After adding the DLL, Unity should not show any import errors. Check Console (Ctrl+Shift+C) for:
- ✓ No "missing assembly" warnings
- ✓ No websocket-sharp related errors
**Method 2: Test Server**
1. Create GameObject → Add `UnityEditorServer` component
2. Enter Play Mode
3. Console should show: `✓ Unity Editor Server started on ws://127.0.0.1:9500`
## Troubleshooting
### Error: "Assembly 'websocket-sharp' not found"
**Solution:**
- Verify DLL is in correct location: `ThirdParty/websocket-sharp/websocket-sharp.dll`
- Restart Unity Editor
- Reimport package: Right-click package → Reimport
### Error: "Could not load file or assembly"
**Solution:**
- Check DLL platform settings (Any Platform should be checked)
- Try different websocket-sharp version
- Ensure you're using .NET Framework 4.x (not .NET Standard)
### DLL Not Appearing in Project Window
**Solution:**
1. Close Unity
2. Delete `Library/` folder in your project
3. Reopen Unity (will reimport all assets)
### Unity 2020.3+ Compatibility
websocket-sharp 1.0.3-rc11 is compatible with:
- Unity 2020.3 LTS
- Unity 2021.3 LTS
- Unity 2022.3 LTS
- Unity 6 (2023.2+)
## Alternative: NuGet for Unity
If you have NuGet for Unity installed:
1. Install NuGet for Unity: https://github.com/GlitchEnzo/NuGetForUnity
2. Open NuGet window: `NuGet → Manage NuGet Packages`
3. Search: "websocket-sharp"
4. Click **Install**
**Advantages:**
- Automatic dependency management
- Easy updates
- No manual DLL copying
**Disadvantages:**
- Requires additional package (NuGet for Unity)
- Slightly larger project size
## File Structure After Installation
```
Packages/com.devgom.unity-editor-toolkit/
├── ThirdParty/
│ └── websocket-sharp/
│ ├── websocket-sharp.dll ← You add this
│ ├── websocket-sharp.dll.meta ← Unity creates this
│ └── README.md ← This file
├── Runtime/
├── Editor/
└── ...
```
## Verification Checklist
- [ ] DLL downloaded from official source
- [ ] DLL placed in `ThirdParty/websocket-sharp/` folder
- [ ] Unity detected and imported DLL (no Console errors)
- [ ] Import settings configured (Any Platform, Editor only)
- [ ] Test server starts successfully in Play Mode
- [ ] No assembly resolution errors in Console
## License Note
websocket-sharp is licensed under the MIT License.
**websocket-sharp License:**
```
MIT License
Copyright (c) 2010-2021 sta.blockhead
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
```
## Support
For issues with:
- **websocket-sharp**: https://github.com/sta/websocket-sharp/issues
- **Unity Editor Toolkit**: https://github.com/Dev-GOM/claude-code-marketplace/issues

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dafe975ce222be046865245222e435a4
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
@echo off
REM Unity Editor Toolkit - websocket-sharp Installer (Windows)
REM This script downloads websocket-sharp.dll automatically
echo =========================================
echo Unity Editor Toolkit
echo websocket-sharp Installer
echo =========================================
echo.
REM Check if DLL already exists
if exist websocket-sharp.dll (
echo [INFO] websocket-sharp.dll already exists!
echo.
choice /C YN /M "Do you want to re-download? (Y/N)"
if errorlevel 2 goto :end
if errorlevel 1 goto :download
) else (
goto :download
)
:download
echo [INFO] Downloading websocket-sharp.dll from GitHub...
echo.
REM Download using PowerShell
powershell -Command "& {Invoke-WebRequest -Uri 'https://github.com/sta/websocket-sharp/releases/download/1.0.3-rc11/websocket-sharp.dll' -OutFile 'websocket-sharp.dll'}"
if exist websocket-sharp.dll (
echo.
echo [SUCCESS] websocket-sharp.dll downloaded successfully!
echo.
echo File location: %CD%\websocket-sharp.dll
echo.
echo Next steps:
echo 1. Return to Unity Editor
echo 2. Unity will automatically detect the DLL
echo 3. Check Console for import confirmation
echo 4. Add UnityEditorServer component to a GameObject
echo 5. Enter Play Mode to start the server
echo.
) else (
echo.
echo [ERROR] Download failed!
echo.
echo Please download manually from:
echo https://github.com/sta/websocket-sharp/releases
echo.
echo And save as: %CD%\websocket-sharp.dll
echo.
)
:end
echo.
pause

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 67927b7e35b838740b9bc5c5fc684b50
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
#!/bin/bash
# Unity Editor Toolkit - websocket-sharp Installer (macOS/Linux)
# This script downloads websocket-sharp.dll automatically
echo "========================================="
echo "Unity Editor Toolkit"
echo "websocket-sharp Installer"
echo "========================================="
echo ""
# Get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DLL_PATH="$SCRIPT_DIR/websocket-sharp.dll"
# Check if DLL already exists
if [ -f "$DLL_PATH" ]; then
echo "[INFO] websocket-sharp.dll already exists!"
echo ""
read -p "Do you want to re-download? (y/n) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 0
fi
fi
echo "[INFO] Downloading websocket-sharp.dll from GitHub..."
echo ""
# Download using curl
if command -v curl &> /dev/null; then
curl -L -o "$DLL_PATH" "https://github.com/sta/websocket-sharp/releases/download/1.0.3-rc11/websocket-sharp.dll"
elif command -v wget &> /dev/null; then
wget -O "$DLL_PATH" "https://github.com/sta/websocket-sharp/releases/download/1.0.3-rc11/websocket-sharp.dll"
else
echo "[ERROR] Neither curl nor wget is available!"
echo ""
echo "Please install curl or wget, or download manually from:"
echo "https://github.com/sta/websocket-sharp/releases"
echo ""
exit 1
fi
# Verify download
if [ -f "$DLL_PATH" ]; then
echo ""
echo "[SUCCESS] websocket-sharp.dll downloaded successfully!"
echo ""
echo "File location: $DLL_PATH"
echo ""
echo "Next steps:"
echo "1. Return to Unity Editor"
echo "2. Unity will automatically detect the DLL"
echo "3. Check Console for import confirmation"
echo "4. Add UnityEditorServer component to a GameObject"
echo "5. Enter Play Mode to start the server"
echo ""
else
echo ""
echo "[ERROR] Download failed!"
echo ""
echo "Please download manually from:"
echo "https://github.com/sta/websocket-sharp/releases"
echo ""
echo "And save as: $DLL_PATH"
echo ""
exit 1
fi

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f48e5d18b0a480649afd4f3c29bb6df3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a1a2ec8e313f23b4f8ff1d791e7558eb