Generic filters
Exact matches only
Search in title
Filter by Custom Post Type
Search in project

Mail System

The Mail system allows players to send mail to one another along with attaching items and currency to the mail they send.


Relevant Files

The default system uses 3 scripts:

  • Mailing.cs – Manages the messages to and from the server. This script should be added to the Scripts.prefab.
  • MailboxUI.cs – The UI script for the Mail system. It should be in the UI.prefab
  • Mailbox.cs – Optional script that can be placed on an object bringing up the Mailbox UI when clicked.


Using the Mail system

There are two options for the mail system:

  1. The player presses a key binding to open the mail UI. To use this method set the Toggle Button on the Mailbox UI component on your UI Game Object.
  2. The player clicks on an Object in the world that has the Mailbox component on it and it brings up the mail UI.


How the Player uses the Mail System

Players can open the mail system using an object with Mailbox.cs component on it, or using the menu icon.

It will open a mailbox window like this

Then, the player can click the New Message button and write a new one, set the recipient, subject, and message, as well as includes currency and items.

When the player will receive an email in the game, the notification icon will be displayed near the mail icon.

When the player will open the mailbox once again, mail will be displayed.

The player can Reply, Delete or Take items/currency that are in the mail.