• 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 InMemoryPlayerLogin

    This class is used to demonstrate how you can effectively bypass the login mechanism used in the LoginController by default. While Llama Chat expects the user is "authenticated" in some way and each player has a unique id, you do not have to do authentication via your Unity code. The critical pieces here are that at the time of Player GameObject creation you must have:

    1. A unique identifier for each player (GUID or some other id)
    2. An active NetworkConnection for that player. See: "HandleUserLogin" on this class for how we "simulate" login. You can make API calls to authenticate the user, retrieve data about the user such as friends list, and more before creating the player, then hydrate the InMemoryPlayerDatabase if you are running with a database separate from your core game.
    Inheritance
    System.Object
    LoginController
    InMemoryPlayerLogin
    Inherited Members
    LoginController.REGISTER_USER_CHANNEL
    LoginController.LOGIN_CHANNEL
    LoginController.PlayerControllerId
    LoginController.LoginDemoUI
    LoginController.InGameUICanvas
    LoginController.PathToDatabase
    LoginController.Connection
    LoginController.HandleRegisterUser(NetworkMessage)
    LoginController.CreatePlayerFromRow(SqliteDataReader, NetworkMessage, Boolean)
    LoginController.ClientHandleRegisterUser(NetworkMessage)
    LoginController.ClientHandleUserLogin(NetworkMessage)
    Namespace: LlamaSoftware.Chat.Demo
    Assembly: LlamaSoftware.Chat.Demo.dll
    Syntax
    public class InMemoryPlayerLogin : LoginController

    Methods

    HandleUserLogin(NetworkMessage)

    Server request processor to handle existing users logging in. Checks email/password from the LoginMessage against the database and sends a LoginResponseMessage to the calling client.

    Declaration
    protected virtual void HandleUserLogin(NetworkMessage message)
    Parameters
    Type Name Description
    NetworkMessage message

    Network Message

    OnStartClient()

    Registers client handlers for RegisterUserResponseMessage and LoginResponseMessage.

    Declaration
    public override void OnStartClient()
    Overrides
    LoginController.OnStartClient()

    OnStartServer()

    Declaration
    public override void OnStartServer()
    Overrides
    LoginController.OnStartServer()
    In This Article
    Back to top Generated by DocFX