Prefabs Reference
This page documents all UI prefabs included with Universal Friend List. These prefabs are ready to use and provide complete implementations for displaying friends, requests, invitations, and blocked users.
FriendListUI.prefab
Complete Friend List Panel
The main prefab that provides a full-featured friend list interface. Includes tabs for Friends, Friend Requests, and Blocked Users sections.
Included Components
FriendListUI- Main controller script- Tab buttons for navigation
- Scrollable content areas
- Search input field
- Add Friend button
Inspector Setup
- Add to Canvas
- Assign
FriendManagerreference - Assign prefab references for list items (or use included ones)
FriendListItem.prefab
Individual Friend Row
A single row item showing one friend's information with status indicator and action buttons.
Display Elements
- Avatar placeholder (circular image)
- Display name text
- Status indicator (colored dot)
- Status text (Online, Offline, In Room)
- Action button (Invite, Join, etc.)
Attached Script
FriendListItemUI - Handles displaying friend data and button clicks
FriendRequestItem.prefab
Friend Request Row
Displays a friend request with sender info and action buttons for Accept/Reject.
Display Elements
- Avatar placeholder
- Requester name
- Request type badge (Incoming/Outgoing)
- Accept button (for incoming)
- Reject/Cancel button
Attached Script
FriendRequestItemUI - Handles request actions
InvitationItem.prefab
Game Invitation Row
Shows a game invitation from a friend with Accept/Decline options.
Display Elements
- Sender avatar and name
- Game/Room name
- Invitation message (if any)
- Accept button
- Decline button
BlockedUserItem.prefab
Blocked User Row
Displays a blocked user with option to unblock.
Display Elements
- Avatar placeholder
- Blocked user's name
- Block date/time
- Unblock button
UI Content Assets
The Content/UI/ folder contains textures used by the prefabs:
| Asset | Use |
|---|---|
| BG.png | Background texture for panels |
| BG Blur.png | Blur background effect |
| Input Field.png | Input field background |
| Search button.png | Search icon button |
| bin.png | Delete/remove icon |
| like.png | Like/favorite icon |
| refresh.png | Refresh icon |
Customization
Styling
All prefabs use standard Unity UI components that can be styled using Unity's UI system or by replacing textures. Colors and fonts can be adjusted in the Inspector.
Layout Modifications
The prefabs use Horizontal/Vertical Layout Groups and Grid Layout Group for automatic arrangement. Modify these components to change spacing, sizing, and alignment.
Adding New Elements
To add new UI elements to a prefab:
- Right-click on prefab → Unpack Completely
- Add your new UI elements
- Connect to existing scripts or add new behavior
- Consider making a duplicate if you still need the original