docs.unity3d.com
    Show / Hide Table of Contents

    Interface ITextChatService

    Inherited Members
    IParticipantProvider<Nullable<TextParticipant>>.GetServiceParticipant(Participant)
    Namespace: Unity.Cloud.Presence
    Syntax
    public interface ITextChatService : IParticipantProvider<TextParticipant?>

    Properties

    Connected

    Gets if the service is connected.

    Declaration
    bool Connected { get; }
    Property Value
    Type Description
    Boolean

    MessageHistory

    Gets the collection of incoming messages.

    Declaration
    IEnumerable<TextChatMessage> MessageHistory { get; }
    Property Value
    Type Description
    IEnumerable<TextChatMessage>

    Methods

    JoinAsync()

    Joins the text service for the current channel.

    Declaration
    Task JoinAsync()
    Returns
    Type Description
    Task

    Returns a task representing the request to join the channel for the current room.

    LeaveAsync()

    Leaves the current text channel.

    Declaration
    Task LeaveAsync()
    Returns
    Type Description
    Task

    Returns a task representing the request to leave the current channel.

    SendMessageAsync(String)

    Sends a message to all participants connected in this channel.

    Declaration
    Task SendMessageAsync(string message)
    Parameters
    Type Name Description
    String message
    Returns
    Type Description
    Task

    Returns a task representing the message sent.

    Events

    MessageReceived

    Calls the methods in its invocation list when there is any new message in the text channel.

    Declaration
    event Action<TextChatMessage> MessageReceived
    Event Type
    Type Description
    Action<TextChatMessage>

    Extension Methods

    GenericDataExtensions.SerializeToByteArray(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023