• Home
  • Documentation
  • Guides
  • FAQ
  • Get Llama Chat
Search Results for

    Show / Hide Table of Contents
    • LlamaSoftware.Chat
      • AbstractPlayerDatabase<T>
      • AreaTriggeredChannelJoiner
      • BaseNetworkManager
      • ChatSystem
      • ChatSystemConstants
      • InMemoryPlayerDatabase
      • LlamaChatSettings
      • LlamaChatSettingsProvider
      • Player_Chat
      • SQLitePlayerDatabase
    • LlamaSoftware.Chat.CustomEditors
      • ChatPanelEditor
      • ChatPopupEditor
      • ChatSystemEditor
      • LlamaChatSettingsCreator
      • Player_ChatEditor
      • SocialUIPopupEditor
      • Utilities
    • LlamaSoftware.Chat.Demo
      • ChatCommandHandler
      • CreateAccount
      • DemoGuildJoiner
      • DemoGuildLeaver
      • DummyNameGenerator
      • DynamicChatPopup
      • InMemoryPlayerLogin
      • Login
      • LoginController
      • SettingsPanel
    • LlamaSoftware.Chat.Demo.Lobby
      • LobbyController
      • LobbyLoginController
      • LobbyNetworkManager
      • LobbyPlayer
      • StressTestSender
    • LlamaSoftware.Chat.Demo.Model
      • LobbyPlayerListMessage
      • LoginMessage
      • LoginResponseMessage
      • RegisterPlayerMessage
      • RegisterUserResponseMessage
    • LlamaSoftware.Chat.Model
      • AddRemoveFriendMessage
      • BlockListMessage
      • BlockUnblockPlayerMessage
      • ChatChannel
      • ChatChannel.ChatType
      • ChatEntry
      • ChatMessage
      • FriendsListMessage
      • FriendUpdateMessage
      • Player
      • PlayerToSocialPlayerConverter
      • ServerBroadcastMessage
      • SocialPlayer
      • SubscribeToChannelsMessage
    • LlamaSoftware.Chat.UI
      • BlockedPlayer
      • ChatChannelClickHandler
      • ChatPanel
      • ChatPanel.DirectChatPlayer
      • ChatPanel.UIChatChannel
      • ChatPopup
      • ChatPopupClickHandler
      • Command
      • DynamicChatItem
      • DynamicChatItemEvent
      • Friend
      • Friend.Status
      • LinkType
      • SocialClickHandler
      • SocialUI
      • SocialUIClickHandler
      • SocialUIPopup
      • UIChatMessage
      • WordFilter

    Class Command

    Chat Commands are commands users can execute by typing /[command name]

    In the examples, we have a Chat command /ping that tells a user their . That is set up as follows: Name = "ping" CallFunctionThenSendMessage = false FunctionToCall = a Unity Event that executes NetworkClient.GetRTT() and mocks a Server Broadcast message telling the user their ping. See: .

    Optionally you can set CallFunctionThenSendMessage to true, which will: remove the /command from the message, execute that command, then send the message over the network.

    In the examples, we have a chat command /[channel] that changes the chat channel then sends the message. So a user can type /say hi all! and it will change the active channel to the "Say" channel then send the message "hi all!" over the network on that channel. That setup is as follows: Name = "say" CallFunctionThenSendMessage = true Function to call = A Unity Event that changes the chat channel .

    Inheritance
    System.Object
    Command
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LlamaSoftware.Chat.UI
    Assembly: LlamaSoftware.Chat.dll
    Syntax
    [Serializable]
    public class Command

    Fields

    CallFunctionThenSendMessage

    If this is true, the "/Name" part of the message will be stripped out, then sent after FunctionToCall.Invoke() is called.

    For example: Name = say CallFunctionThenSendMessage = true FunctionToCall set to change chat channel to the /say channel, then the user types "/say hello", the chat channel will be changed to the "say" channel and the message "hello" will be sent over the network on that channel.

    Declaration
    public bool CallFunctionThenSendMessage
    Field Value
    Type Description
    System.Boolean

    FunctionToCall

    Function to call for the command. CallFunctionThenSendMessage modifies the behavior.

    Declaration
    public UnityEvent FunctionToCall
    Field Value
    Type Description
    UnityEngine.Events.UnityEvent

    Name

    Name of the command. Users will type /Name to execute the command

    Declaration
    public string Name
    Field Value
    Type Description
    System.String
    In This Article
    Back to top Generated by DocFX