Data Models
These are the core data structures used throughout the friend system. All models are in the ElderWorldStudio.FriendList.Models namespace and are marked [Serializable] for Unity serialization.
Friend
Scripts/Models/Friend.cs
Represents a friend in your list.
| Property | Type | Description |
|---|---|---|
UserId | string | Unique identifier |
DisplayName | string | Visible name |
Status | FriendStatus | Online/Offline/InRoom |
CurrentRoom | RoomInfo | Room data if in room |
AddedTimestamp | long | Unix time added |
CustomData | string | Extra data |
FriendRequest
Scripts/Models/FriendRequest.cs
Represents a friend request between users.
| Property | Type | Description |
|---|---|---|
RequestId | string | Unique request ID |
SenderId | string | Who sent it |
ReceiverId | string | Who receives it |
SenderName | string | Sender's display name |
Status | FriendRequestStatus | Pending/Accepted/Rejected |
CreatedAt | long | Unix timestamp |
FriendInvitation
Scripts/Models/FriendInvitation.cs
Represents a game invitation sent to a friend.
| Property | Type | Description |
|---|---|---|
Id | string | Unique invitation ID |
FromUserId | string | Who sent it |
FromUsername | string | Sender's name |
ToUserId | string | Who receives |
Message | string | Personal message |
RoomInfo | RoomInfo | Room to join |
CustomData | Dictionary<string,string> | Extra data |
Status | InvitationStatus | Pending/Accepted/Declined |
CreatedAt | long | Unix timestamp |
RoomInfo
Scripts/Models/RoomInfo.cs
Information about a game room or session.
| Property | Type | Description |
|---|---|---|
RoomId | string | Unique room ID |
RoomName | string | Display name |
HostId | string | Host user ID |
MaxPlayers | int | Max capacity |
CurrentPlayers | int | Current count |
IsPrivate | bool | Password protected |
BlockEntry
Scripts/Models/BlockEntry.cs
Represents a blocked user entry.
| Property | Type | Description |
|---|---|---|
UserId | string | Blocked user's ID |
BlockedAt | long | Unix timestamp |
Status Enums
FriendStatus
Online status of a friend:
Online- Connected and availableOffline- Not connectedInRoom- In a game roomAway- Marked as away
FriendRequestStatus
Status of a friend request:
Pending- Awaiting responseAccepted- Accepted by receiverRejected- Declined by receiverCancelled- Cancelled by sender
InvitationStatus
Status of a game invitation:
Pending- Awaiting responseAccepted- AcceptedDeclined- DeclinedExpired- Timed out
NetworkBackendType
Supported networking backends:
PhotonPUNPhotonFusionMirrorUnityNetcodeFishNetCustom