文档

​
​

Development

User Acquisition

Monetization

工业

Vivox Unity SDK

Vivox Unity SDK

Vivox
​
​
Vivox Unity SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
    • Set up your project
    • Create voice and text channels
    • Messaging
      • Channel messages
      • Message metadata
      • Chat history
      • Edit and delete messages
      • Directed messages
      • Offline direct messages
      • Anti-flooding
      • Large text channel setting
      • Retrieve Conversations list
      • Set Chat Markers
    • Player management
    • Device management
    • Audio management
    • Mobile development
    • Text-to-speech
    • Speech-to-text
    • Real-time recording
    • Server-side-recording
    • Troubleshooting
  • Tutorials
  • Reference
  1. Vivox Unity SDK 文档

编辑和删除消息

Edit and delete messages in channels.
阅读时间1 分钟
最后更新于 8 个月前

Vivox 提供了编辑和删除已发送到频道的消息的方法。

编辑频道消息

Vivox 允许用户使用
VivoxService.Instance.EditChannelTextMessageAsync(string channelName, string messageId, string newMessage)
编辑他们发送到频道的消息文本,其中 channelName 是消息发送到的频道的名称,messageId 是要更改的消息的 ID,newMessage 是更新的消息文本。
当频道中的任何人成功编辑消息后,频道中的所有人都将收到一个
VivoxService.Instance.ChannelMessageEdited
操作,其中包含已编辑的 VivoxMessage 以及更新的 MessageText。
public async void UpdateChannelMessageAsync(VivoxMessage messageToUpdate, string updatedMessageText){ await VivoxService.Instance.EditChannelTextMessageAsync(messageToUpdate.ChannelName, messageToUpdate.MessageId, updatedMessageText);}

删除频道消息

Vivox 允许用户使用
VivoxService.Instance.DeleteChannelTextMessageAsync(string channelName, string messageId)
删除他们发送到频道的消息,其中 channelName 是消息发送到的频道的名称,messageId 是要删除的消息的 ID。
当频道中的任何人成功删除消息后,频道中的所有人都将收到一个
VivoxService.Instance.ChannelMessageDeleted
操作,其中包含已删除的 VivoxMessage。
public async void DeleteChannelMessageAsync(VivoxMessage messageToDelete){ await VivoxService.Instance.DeleteChannelTextMessageAsync(messageToDelete.ChannelName, messageToDelete.MessageId)}

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • 编辑频道消息

    • 删除频道消息


报告此页面的问题