Universal Friend List
A comprehensive multiplayer friend list system for Unity that supports multiple networking backends including Photon PUN, Photon Fusion, Mirror, Unity Netcode for GameObjects, FishNet, and custom server solutions. Includes WebSocket support for real-time updates.
What is Universal Friend List?
Universal Friend List is a Unity asset that provides a complete social friend system for multiplayer games. It handles the complex task of managing friends, friend requests, blocking users, online presence, and game invitations across different networking solutions.
Whether you're building a room-based competitive game, an open-world MMO-style experience, or anything in between, Universal Friend List provides the building blocks you need to add social features quickly.
Key Features
Friend Management
Complete friend list functionality including adding friends, removing friends, and managing your social connections. Supports both real-time presence updates and polling-based status checks.
Friend Requests
Send, accept, reject, and cancel friend requests. The system handles incoming requests with proper notification and UI integration.
User Blocking
Block and unblock users to maintain a safe gaming environment. Blocked users cannot send friend requests or see your online status.
Online Presence
Track when friends come online, go offline, or join game rooms. Real-time presence updates via WebSocket or periodic polling.
Room Invitations
Send invitations to friends to join your game room. Supports both room-based games (with fixed room codes) and open-world games (with seamless transitions).
Multiple Network Support
One consistent API across Photon PUN, Photon Fusion, Mirror, Unity Netcode for GameObjects, FishNet, and custom backends. Switch networking solutions without changing your social feature code.
System Architecture
The Universal Friend List system is designed with a clean layered architecture:
| Layer | Description | Examples |
|---|---|---|
| UI Layer | User interface components that display friend lists, requests, and invitations | FriendListUI, FriendRequestItemUI |
| Manager Layer | Core business logic and event management | FriendManager, GameTypeManager |
| Abstraction Layer | Interfaces that define contracts between components | IFriendManager, INetworkFriendSystem |
| Network Layer | Backend-specific implementations | PhotonPunNativeFriendSystem, MirrorCustomFriendSystem |
| Server Layer | Backend server implementations | Node.js WebSocket server, PHP REST API |
Supported Networking Backends
| Backend | Native Friends | Custom Server | Best For |
|---|---|---|---|
| Photon PUN | Yes | Yes | Turn-based, FPS, general multiplayer |
| Photon Fusion | Yes | Yes | Real-time action, sports, VR |
| Mirror | No | Yes | MMORPG, open world, dedicated servers |
| Unity Netcode | Varies | Yes | Co-op, party games, small sessions |
| FishNet | Varies | Yes | High-performance multiplayer |
| Custom | N/A | Yes | Your own backend solution |
Documentation Structure
This wiki is organized to serve both non-developers and experienced programmers:
- Getting Started - Installation, package contents, and quick setup guides
- Unity Setup - Detailed guides for each Unity component and prefab
- Network Integration - Backend-specific setup instructions
- Game Types - Configure for room-based or open-world games
- Server Setup - Deploy Node.js or PHP servers
- API Reference - Complete technical API documentation
- Support - Troubleshooting and performance optimization
Who Is This Asset For?
For Non-Developers
If you're a game designer, producer, or someone who prefers not to code, you can use the preset system and inspector-based configuration to set up friend features without writing code. The editor tools provide visual workflows for most common scenarios.
- Use ScriptableObject presets to configure behavior
- Connect UI elements through Unity's inspector
- Use the Setup Wizard for guided configuration
- Follow the Quick Start guide for typical setups
For Developers
If you're an experienced programmer, you'll appreciate the clean architecture, extensible design, and comprehensive API. The system is built around interfaces that make it easy to add custom functionality.
- Implement
IGameTypeHandlerfor custom game types - Extend
BaseCustomFriendSystemfor custom backends - Subscribe to events for reactive programming
- Full source code included and modifiable