CREATE YOUR WORLD
Chat

Customize sending and receiving chat messages

11min

You can customize the chat messages you send and receive by importing the ZEPETO.Chat package.

❗️ Caution

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

👍 Points for reference

  • You can send/receive chat even in an editor environment.
  • Only chat messages created by users through handlers can be sent/received (quick chat, system messages cannot be received)



Function definition

TypeScript

  • ZepetoChat.You can use Send() to send specific messages to the chat window.
  • You can use the ZepetoChat.OnReceivedMessage.AddListener() to determine which event to receive the message.



Example of use

Press the buttons 1 and 2 to send a specified message. Create a custom message in inputField to send the message.

Example Setting
Example Setting




TypeScript

Example Execution Results
Example Execution Results




Enabling/disabling the chat button

  • Feature available in a World where multiplayer elements are implemented.
  • You can check on the mobile test.
  • Declarations
TypeScript

  • Example code
    • Press a specific button to toggle the chat button as enabled/disabled
TypeScript

Document image




Determining filtered messages

  • Feature available in a World where multiplayer elements are implemented.
  • You can check on the mobile test.
  • Declarations
TypeScript

  • Example code
    • Determine if the received chat message is a filtered message and print it out on the screen.
TypeScript

Document image

Document image