CREATE YOUR WORLD
Chat

QuickChat

5min

QuickMessage-related functions in the ZepetoWorldContent API can be used to implement the ability to send and receive messages within the world.

Document image

  • This feature is available in a World where multiplayer elements are implemented.



In order to use QuickMessage functions, you must create an import statement as follows.

TypeScript




ZepetoWorldContent API provides the following QuickMessage-related functions.

API

Description

ZepetoWorldContent.GetQuickMessageList($onComplete: System.Action$1<QuickMessage[]>, $onError: System.Action$1)

Import the QuickMessage list for the current World. (Import which corresponds to the language of the device.)



It can be used as the code shown below.

TypeScript




WorldMultiplayChatContent API enables QuickMessage synchronization in multi-player.

When using the functions below, a chat message is sent and output in the chat window. In addition, if you enable BubbleChat in ZepetoPlayers, you can see that a speech bubble pops up in the app.

API

Description

SendQuickMessage($quickId: string):void;

Sends a quickId message entered to the multi-player server.

❗️ Caution If the value of the quickId is different from the existing QuickMessage list, it will not be sent.



QuickMessage class consists of the following components:

TypeScript




The following is an entire example code that uses functions of QuickMessage features.

TypeScript