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

  1. Add to Canvas
  2. Assign FriendManager reference
  3. 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:

AssetUse
BG.pngBackground texture for panels
BG Blur.pngBlur background effect
Input Field.pngInput field background
Search button.pngSearch icon button
bin.pngDelete/remove icon
like.pngLike/favorite icon
refresh.pngRefresh 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:

  1. Right-click on prefab → Unpack Completely
  2. Add your new UI elements
  3. Connect to existing scripts or add new behavior
  4. Consider making a duplicate if you still need the original