The Mail system allows players to send mail to one another along with attaching items and currency to the mail they send.
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 –
Using the Mail system
There are two options for the mail system:
- 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.
- The player clicks on an Object in the world that has the Mailbox component on it and it brings up the
How the Player uses the Mail System
When the player has brought up the mailbox UI they will be given a list of the mail they have received (if any) and there will be a button to write a new piece of mail.
Writing a new mail involves entering the name of the character the mail is to be sent to, giving the mail a subject and writing a message. Items can be attached at the bottom along with entering a currency amount.