Unity Game Integration
Last Updated: 2025-01-16
Status: ⚠️ Planned (API Ready, SDK Pending)
Primary Source: docs/project_status.md
Overview
Unity game integration enables native game experiences with ASO consciousness. The backend API is ready, but the Unity SDK is pending implementation.
Client Vision
Original Request
From Client: "I'm currently developing a romance / story-based game inspired by Japanese-style visual novels and interactive relationship systems. The project focuses on AI-driven conversations, emotional expression, and immersive 2.5D anime-style presentation."
Requirements:
- Unity game with C# integration
- AI conversation (ChatGPT-style NPCs)
- Cross-platform memory synchronization
- Universal login system
Current State
✅ API Ready
Available Endpoints:
POST /api/auth/token- Direct token request for native clientsGET /api/sync/universal-state- Get complete ASO statePOST /api/sync/ingest-event- Write events to timeline- All REST API endpoints accessible
Authentication:
- JWT token support
- Client type tracking
- Universal state API
❌ Missing
- Unity SDK (C# client library)
- Unity-specific integration examples
- Game state management
- Unity UI components
Implementation Requirements
Unity SDK Components
Authentication Client
- Login with email/password
- Token management
- Token refresh
Memory Sync Client
- Fetch conversation context
- Send messages
- Receive responses
Game State Management
- Quest state
- Inventory state
- Relationship flags
- Timeline position
Unity Integration
- C# client library
- Unity UI components
- Integration examples
Integration Architecture
Unity → Backend Flow
Future Implementation
Phase 1: Unity SDK Development
- Create Unity SDK project
- Build C# client library
- Implement authentication client
- Implement memory sync client
Phase 2: Game Integration
- Create Unity integration examples
- Build game state management
- Integrate with Unity UI
- Add Unity-specific features
Phase 3: Testing & Documentation
- Create integration examples
- Write Unity integration guide
- Test cross-platform memory sync
- Document Unity-specific features
Source Files
Primary Source:
docs/project_status.md- System status
Related Files:
backend/src/services/auth.service.ts- Authentication (ready)backend/src/routes/sync.routes.ts- Sync endpoints (ready)
Related Documentation
- Universal Login - Authentication system
- Cross-Platform Memory - Memory sync
- 01-CLIENT-VISION-AND-ALIGNMENT.md - Alignment analysis
- 00-OVERVIEW.md - System overview