Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
All services: admin-v2, studio-v2, website, ai-compliance-sdk, consent-service, klausur-service, voice-service, and infrastructure. Large PDFs and compiled binaries excluded via .gitignore.
279 lines
6.4 KiB
Markdown
279 lines
6.4 KiB
Markdown
# Breakpilot Drive - Unity Projekt Setup
|
|
|
|
## Schritt-fuer-Schritt Anleitung
|
|
|
|
Diese Anleitung fuehrt Sie durch die Einrichtung des Unity-Projekts nach der Installation.
|
|
|
|
---
|
|
|
|
## 1. Neues Projekt erstellen
|
|
|
|
1. **Unity Hub** oeffnen
|
|
2. **"Projects"** Tab waehlen
|
|
3. **"New project"** klicken
|
|
4. Einstellungen:
|
|
- Template: **3D (Built-in Render Pipeline)**
|
|
- Project name: **BreakpilotDrive**
|
|
- Location: `/pfad/zu/breakpilot-pwa/breakpilot-drive/Unity/`
|
|
5. **"Create project"** klicken
|
|
|
|
---
|
|
|
|
## 2. Ordnerstruktur erstellen
|
|
|
|
Nach dem Projekt-Start in Unity:
|
|
|
|
### 2.1 Im Project-Fenster (unten)
|
|
|
|
Rechtsklick → Create → Folder fuer jeden Ordner:
|
|
|
|
```
|
|
Assets/
|
|
├── Scripts/
|
|
│ ├── Core/
|
|
│ ├── Player/
|
|
│ ├── Track/
|
|
│ ├── Quiz/
|
|
│ ├── Network/
|
|
│ └── UI/
|
|
├── Prefabs/
|
|
│ ├── Player/
|
|
│ ├── Obstacles/
|
|
│ ├── Items/
|
|
│ └── VisualTriggers/
|
|
├── Audio/
|
|
│ ├── Music/
|
|
│ ├── SFX/
|
|
│ └── Voice/
|
|
├── Scenes/
|
|
├── Materials/
|
|
├── Plugins/
|
|
│ └── WebGL/
|
|
├── ThirdParty/
|
|
│ └── Kenney/
|
|
└── WebGLTemplates/
|
|
└── Breakpilot/
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Scripts importieren
|
|
|
|
### 3.1 Im Finder/Explorer
|
|
|
|
1. Oeffnen Sie: `breakpilot-pwa/breakpilot-drive/UnityScripts/`
|
|
2. Kopieren Sie die Dateien in die entsprechenden Unity-Ordner:
|
|
|
|
| Quelle | Ziel |
|
|
|--------|------|
|
|
| `UnityScripts/Core/*.cs` | `Assets/Scripts/Core/` |
|
|
| `UnityScripts/Player/*.cs` | `Assets/Scripts/Player/` |
|
|
| `UnityScripts/Track/*.cs` | `Assets/Scripts/Track/` |
|
|
| `UnityScripts/Quiz/*.cs` | `Assets/Scripts/Quiz/` |
|
|
| `UnityScripts/UI/*.cs` | `Assets/Scripts/UI/` |
|
|
| `UnityScripts/BreakpilotAPI.cs` | `Assets/Scripts/Network/` |
|
|
| `UnityScripts/QuizManager.cs` | `Assets/Scripts/Quiz/` |
|
|
| `UnityScripts/Plugins/*.jslib` | `Assets/Plugins/WebGL/` |
|
|
| `UnityScripts/WebGLTemplate/Breakpilot/*` | `Assets/WebGLTemplates/Breakpilot/` |
|
|
|
|
### 3.2 In Unity
|
|
|
|
Nach dem Kopieren:
|
|
1. Zurueck zu Unity wechseln
|
|
2. Unity importiert die Dateien automatisch
|
|
3. Falls Fehler erscheinen: Console pruefen (Window → General → Console)
|
|
|
|
---
|
|
|
|
## 4. Kenney Assets importieren
|
|
|
|
### 4.1 Car Kit
|
|
|
|
1. Finden Sie die heruntergeladene ZIP-Datei (`kenney_car-kit.zip`)
|
|
2. Entpacken Sie sie
|
|
3. In Unity: **Assets → Import Package → Custom Package**
|
|
4. Oder: Ziehen Sie die entpackten Dateien in `Assets/ThirdParty/Kenney/CarKit/`
|
|
|
|
### 4.2 Nature Kit
|
|
|
|
1. Finden Sie `kenney_nature-kit.zip`
|
|
2. Entpacken Sie sie
|
|
3. Ziehen Sie die Dateien in `Assets/ThirdParty/Kenney/NatureKit/`
|
|
|
|
---
|
|
|
|
## 5. TextMeshPro installieren
|
|
|
|
1. **Window → TextMeshPro → Import TMP Essential Resources**
|
|
2. Im Dialog: **"Import"** klicken
|
|
3. Warten bis der Import abgeschlossen ist
|
|
|
|
---
|
|
|
|
## 6. Szenen erstellen
|
|
|
|
### 6.1 MainMenu Szene
|
|
|
|
1. **File → New Scene**
|
|
2. **File → Save As** → `Assets/Scenes/MainMenu.unity`
|
|
|
|
### 6.2 Game_Video Szene
|
|
|
|
1. **File → New Scene**
|
|
2. **File → Save As** → `Assets/Scenes/Game_Video.unity`
|
|
|
|
### 6.3 Game_Audio Szene (optional fuer spaeter)
|
|
|
|
1. **File → New Scene**
|
|
2. **File → Save As** → `Assets/Scenes/Game_Audio.unity`
|
|
|
|
---
|
|
|
|
## 7. Manager-Objekte erstellen
|
|
|
|
### 7.1 In Game_Video Szene
|
|
|
|
1. Oeffnen Sie `Game_Video.unity`
|
|
2. Erstellen Sie leere GameObjects (Rechtsklick in Hierarchy → Create Empty):
|
|
|
|
| Name | Scripts hinzufuegen |
|
|
|------|---------------------|
|
|
| **GameManager** | GameManager.cs |
|
|
| **DifficultyManager** | DifficultyManager.cs |
|
|
| **AudioManager** | AudioManager.cs |
|
|
| **BreakpilotAPI** | BreakpilotAPI.cs |
|
|
| **QuizManager** | QuizManager.cs |
|
|
| **TrackGenerator** | TrackGenerator.cs |
|
|
| **ObstacleSpawner** | ObstacleSpawner.cs |
|
|
|
|
### 7.2 Script hinzufuegen
|
|
|
|
1. GameObject auswaehlen
|
|
2. Im Inspector: **Add Component**
|
|
3. Script-Namen eingeben (z.B. "GameManager")
|
|
4. Script auswaehlen
|
|
|
|
---
|
|
|
|
## 8. Spieler erstellen
|
|
|
|
### 8.1 Auto-Prefab
|
|
|
|
1. In `Assets/ThirdParty/Kenney/CarKit/` ein Auto-Modell finden
|
|
2. In die Szene ziehen
|
|
3. Komponenten hinzufuegen:
|
|
- **Rigidbody** (Add Component → Physics → Rigidbody)
|
|
- **Box Collider** (Add Component → Physics → Box Collider)
|
|
- **PlayerController.cs** (Add Component → Scripts → Player)
|
|
4. Tag setzen: Im Inspector → Tag → **"Player"** (falls nicht vorhanden: Add Tag)
|
|
5. Als Prefab speichern: Aus Hierarchy in `Assets/Prefabs/Player/` ziehen
|
|
|
|
---
|
|
|
|
## 9. Tags erstellen
|
|
|
|
1. **Edit → Project Settings → Tags and Layers**
|
|
2. Tags hinzufuegen:
|
|
- `Player`
|
|
- `Obstacle`
|
|
- `Coin`
|
|
- `Star`
|
|
- `Shield`
|
|
- `QuizTrigger`
|
|
|
|
---
|
|
|
|
## 10. Build Settings
|
|
|
|
### 10.1 WebGL Platform
|
|
|
|
1. **File → Build Settings**
|
|
2. **WebGL** auswaehlen
|
|
3. **"Switch Platform"** klicken (kann einige Minuten dauern)
|
|
|
|
### 10.2 Szenen hinzufuegen
|
|
|
|
1. Im Build Settings Fenster
|
|
2. **"Add Open Scenes"** klicken fuer jede Szene
|
|
3. Reihenfolge: MainMenu (Index 0), Game_Video (Index 1)
|
|
|
|
### 10.3 Player Settings
|
|
|
|
1. Im Build Settings: **"Player Settings"** klicken
|
|
2. Einstellungen:
|
|
|
|
```
|
|
Company Name: Breakpilot
|
|
Product Name: Breakpilot Drive
|
|
Version: 0.1.0
|
|
|
|
Resolution and Presentation:
|
|
WebGL Template: Breakpilot (falls verfuegbar)
|
|
Run in Background: true
|
|
|
|
Publishing Settings:
|
|
Compression Format: Gzip
|
|
Decompression Fallback: true
|
|
Data Caching: true
|
|
```
|
|
|
|
---
|
|
|
|
## 11. Erster Test
|
|
|
|
### 11.1 Im Editor
|
|
|
|
1. Game_Video Szene oeffnen
|
|
2. **Play-Button** druecken
|
|
3. Console auf Fehler pruefen
|
|
|
|
### 11.2 Haeufige Fehler
|
|
|
|
| Fehler | Loesung |
|
|
|--------|---------|
|
|
| "Script can't be loaded" | Script-Datei pruefen, Namespace korrekt? |
|
|
| "Missing Reference" | Inspector pruefen, Referenzen zuweisen |
|
|
| "Tag not found" | Tags in Project Settings erstellen |
|
|
| "TMP not found" | TextMeshPro importieren |
|
|
|
|
---
|
|
|
|
## 12. WebGL Build
|
|
|
|
Erst nach erfolgreichem Editor-Test:
|
|
|
|
1. **File → Build Settings**
|
|
2. **"Build"** klicken
|
|
3. Zielordner: `breakpilot-pwa/breakpilot-drive/Build/`
|
|
4. Warten (kann 5-10 Minuten dauern)
|
|
|
|
Nach dem Build:
|
|
```bash
|
|
cd breakpilot-pwa
|
|
docker-compose --profile game build breakpilot-drive
|
|
docker-compose --profile game up -d
|
|
open http://localhost:3001
|
|
```
|
|
|
|
---
|
|
|
|
## Naechste Schritte
|
|
|
|
Nach dem Setup:
|
|
|
|
1. [ ] Strecken-Prefabs erstellen (aus Kenney Assets)
|
|
2. [ ] Hindernis-Prefabs erstellen
|
|
3. [ ] Quiz-Trigger-Prefabs erstellen
|
|
4. [ ] UI Canvas einrichten
|
|
5. [ ] Audio-Clips zuweisen
|
|
6. [ ] API-URL konfigurieren
|
|
|
|
---
|
|
|
|
## Hilfe
|
|
|
|
Bei Problemen:
|
|
- Unity Console pruefen (Window → General → Console)
|
|
- Dokumentation lesen: `docs/breakpilot-drive/`
|
|
- API testen: `curl http://localhost:8000/api/game/health`
|