Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

[Released] Llama Chat - The Social Platform for your Unity Game

Discussion in 'Assets and Asset Store' started by ChrisKurhan, Sep 5, 2018.

  1. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    -->GET IT HERE<--

    Video Tutorials here.

    Requires Text Mesh Pro from the Package Manager.
    Optionally, use Mirror instead of UNET.

    Forum Thread (you are here) | Llama Software Support Email | Online API Documentation

    Llama Chat is more than just a chat system. It's a feature rich social platform for your Unity UNET or Mirror game.


    Is Llama Chat for you?
    Do you need dynamic chat channels? Regional/Zoned Chat Channels? World Space Chat Bubbles? Persistent Chat Channels across sessions? Private Messaging? Friends List? Guilds? Block Lists? Word Filters? Chat Commands? One or more of the above?
    Then yes! To provide all of these features Llama Chat ships with an sqlite3 database sample. Any Identity manager will work, however storing chat channel information, friends, etc.. requires a database of some kind. Abstract Interface provided for Database integration for easy database swapping.


    Llama Chat provides extensive inspector integration to allow you to customize your chat channels.


    ✔ 100% Unity/UNET - no external networking library
    Mirror Support
    ✔ Tying users to an account
    ✔ Server driven, dynamic channels
    ✔ Global chat channels
    ✔ Smart Multi-threading - free up the main Unity thread to do other important work when expensive operations are being performed
    ✔ Chat retained on scene change
    ✔ "Regional" Chat channels - only show some chat channel if players are within some area
    ✔ Private chat channels - such as "Guild chat" - you don't want other people spying on your guild chat
    ✔ User channels persisted on Server
    ✔ "Friends" List
    ✔ Friend Online/Offline Status
    ✔ Persists across sessions
    ✔ Direct player messaging / whisper
    ✔ World Space Chat bubbles - e.g. so you type in "Say" channel "hello!" and you get "hello!" above your head and others see it there too
    ✔ Customizable Player Context Menu on right click
    Demo Includes:
    ✔ Whisper
    ✔ Add Friend
    ✔ Mute/Ignore
    ✔ Extensible to more
    ✔ Customizable Language Filter
    ✔ Customizable chat format - modify the order/hide any
    ✔ Timestamp
    ✔ Channel
    ✔ Sender Name
    ✔ Message
    ✔ Custom text color per channel
    ✔ Chat Commands
    ✔ Dynamic joining/leaving channels
    ✔ Editor Integration
    All of these are showcased in demo scenes!

    Supports Unity 2018.4 LTS and Unity 2019 LTS.

    -->GET IT HERE<--
     
    Last edited: Nov 12, 2020
  2. Hawkadium

    Hawkadium

    Joined:
    Oct 7, 2014
    Posts:
    28
    Is there any support for uMMORPG or an integration guide?
     
  3. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Hey Hawkadium!
    Since uMMORPG uses UNET (or.. maybe Mirror now?) for its networking- there should be no issue using them together.
    However I must confess I do not have uMMORPG and have not integrated with it myself.

    In terms of Integration, on page 10 of the documentation linked above I outline in broad strokes what you will need to do to integrate into an existing project. If you need some additional help integrating you can always send an email to support@llama.software and I would be happy to help you with any questions.
     
  4. yomanx

    yomanx

    Joined:
    Dec 5, 2016
    Posts:
    38
    Hi friend, server side is php? will it work with my mysql/php server?
     
  5. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Hi yomanx! No the server side is C# integrated into Unity. If you have a MySQL database of users you can integrate with that for your login and identity system for your game, but that would be the extent of the integration.
    You would not be able to have chat show on your website or something like that.
     
  6. Ursa9Studios

    Ursa9Studios

    Joined:
    Nov 9, 2016
    Posts:
    1
    When I follow the tutorial videos or just open the demo scene in a fresh project, I get the error "NetworkClient Send with no connection". I cannot figure out what or where to add information to stop this error. Any help would be appreciated. I will try to figure out a solution until then.
     
  7. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    That's usually because the network client has not been connected properly. Make sure you've pressed StartHost on at least one instance of the demo (Unity Editor is fine too). StartClient must be pressed on any other clients connecting.
    If you still have issues, can you post some screenshots? That would help understand better what is going on
     
  8. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    Will this work with mirror networking using webgl client over websockets?
     
  9. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    I haven't tested Mirror's websocket capabilities but Llama Chat uses Commands and SyncVars to work which work consistently regardless of transport. I have used it with a WebGL client connecting to a server and that was working.
     
    MuntyMcFly likes this.
  10. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    Thank you for the fast response! That is what I was hoping to hear :) I bought the asset and seems like it should work but I am having an issue running the mirror demo scene with the default transport. When I try to login it presents me with this error:


    *(Edit: image of the error is not displaying)

    Disconnecting connId=0 to prevent exploits from an Exception in MessageHandler: NullReferenceException Object reference not set to an instance of an object
    at LlamaSoftware.Chat.Player_Chat.ClientFriendsListUpdated (LlamaSoftware.Chat.Model.FriendsListMessage friendsListMessage) [0x00015] in C:\Users\Arysum\Desktop\LlamaSetup\Assets\Llama Software\Llama Chat\Scripts\Player_Chat.cs:529


    Am I missing something?
     
  11. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Can you help me with what version of Unity you are using, which scene you are getting this error on, and what you did after clicking play to get this error?
     
  12. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14

    Unity Version 2020.3.16f1
    Scene: mirror-demo-login
    When I click play I then click the server button or the host/client button and then make an account which seems to work
    then I enter the login info for that account and click login then the error happens. I have tried it both ways and with exported client and server.
     
  13. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Ah this is likely due to a missing configuration that you have to create after importing the Llama Chat asset.

    If you go to Assets > Create > Llama Chat > Settings then try the steps you've listed above you should not encounter that error.
    upload_2021-9-19_18-37-12.png

    If you still have the error after doing that please let me know!
     
    MuntyMcFly likes this.
  14. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    That was the issue :) Sorry for not catching that part! I am having another issue when I try to build or switch to webgl platform I encounter a stream of errors and then they are followed by warnings from mirror when I switch back to desktop platform. Screenshot_2.png Screenshot_3.png


    Before I tried building to webgl I encountered this error as well which is unrelated but I couldn't figure out either.
    Unknown message id: 22269. This can happen if no handler was registered for this message.
    I get this last error after logging in two clients then trying to send a message.

    Edit: The last error resolved itself somehow lol

    Hopefully this helps :)
     
    Last edited: Sep 20, 2021 at 2:38 AM
  15. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    When I strip down all of that code based on those errors I am left with these errors

    Screenshot_1.png

    on both the simple chat asset and the llama chat versions so I am guessing its not compatible with the most current mirror version and webgl? I am confused why it would not work only with this build platform.
     
  16. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    I've just checked with the most recent Asset Store version of Mirror and both Simple Chat and Llama Chat in an empty project and they are working with the current Mirror version. From the errors above and this one it sounds like maybe you got an older version of Llama Chat. Could you check the "My Assets" page on the Asset Store and see if it offers you an update?

    Another possible issue could be the Mirror defines didn't get configured correctly due to some compilation errors from your previous post.

    I'd recommend trying the following:
    1. Delete Llama Chat from your project
    2. Reimport Mirror and validate the scripting define symbols are configured (Project Settings > Player > Other > Scripting Define Symbols - check for MIRROR and MIRROR_24_O_OR_NEWER - these are both usually added by Mirror by default when you import it, but if they're not there you can also add those.
    3. Check for any updates to Llama Chat, if there is one, update, then reimport it.
      1. You can check the changelog.txt in the Llama Chat folder to see which version you currently have, it should be 2.4.

    Edit:
    After doing this again in a new project - it seems Mirror doesn't always add the scripting define symbols to all available platforms on import. I imported Mirror and Llama Chat with a Standalone PC / Mac / Linux configuration, everything was fine, changed to WebGL then got all the errors you've mentioned. I copy/pasted the scripting define symbols from the other platform into the WebGL Project Settings configuration. Then maybe reopening the editor is required, or delete Llama Chat from the project and import it again.

    Unity wasn't picking up the new scripting defines even with a Right click > Reimport that's why I mentioned the second option of deleting and reimporting.
     
    Last edited: Sep 20, 2021 at 12:19 PM
    MuntyMcFly likes this.
  17. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    I can happily confirm that was the problem and it is resolved. I had to copy the defines and then just restart the project and the errors went away :) Thank you so much for this support I am really excited to get to use this asset in game! I will leave a great review asap.

    Additionally it seems mirror does not copy the defines over they went completely blank when the project was changed to webgl.

    This also fixed the SimpleChat asset.
     
    Last edited: Sep 20, 2021 at 5:59 PM
    ChrisKurhan likes this.
  18. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Really great to hear! I'd love to see how you integrate it into your game when you have a working prototype
     
  19. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    I will definitely keep you updated :)


    [I could very easily be doing something wrong]

    I'm trying to start with the simple chat asset to learn more about this chat system but I am having some issues and its similar to one in a review you had I don't think they knew how to explain the issue well enough though. What is happening is when I try to run the demo for it I am faced with this error.
    simplechatissue.png

    That seems to be caused by the inputField object but even if I instance it manually it does not show up. I don't have this issue with Llama chat but figured I should mention it here. I do have TMPro installed and the unity version is 2020.3.16f1. The error shows in ChatPlayer when it tries to access the ChatSystem component.

    TextMeshPro Version: 3.0.6
     
    Last edited: Sep 20, 2021 at 7:39 PM
  20. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Thanks for that report on Simple Chat too! For that one I'm not able to get the same error on a clean project with just Mirror and Simple Chat. Could you send me an email with a zip of that project to support@llama.software and I can investigate it further?
     
  21. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    Sure thing I will try to get that to you asap :)

    I have a question about how to host this with the database file on a linux server. How do we point the server to the file in the directory and where do we put it? I just built it for linux by default because I wasn't thinking about that issue. Everything worked (besides some other setup problems) until I get this error which makes sense since I probably don't have that file on the server lol

    SqliteException: Unable to open the database file

    Is there a quick way to resolve this?

    Can I do something like this and then put the login.db in the root directory of the server executable?

    protected readonly string PathToDatabase = "URI=file:./login.db";

    I tried similar but wasn't able to get it to pick it up but also wasn't sure that's how it works.

    I know I have to change the config in two places code wise but I don't know how to point those at the proper directory for a server build.
     
    Last edited: Sep 23, 2021 at 1:14 AM
  22. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    I found out this seems to happen only when using the SimpleWebTransport. If you switch to that transport it should trigger that error when you send a message. I thought I had originally got that error from the Teleport transport but I think I was wrong.
     
    Last edited: Sep 23, 2021 at 5:07 AM
  23. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    121
    Hey sorry for the delayed reply on this I wanted to take a little time to explain the whole process of using a database.

    First, if you want to keep using SQLite then you are good to go with the SQLitePlayerDatabase. If you're targeting a high concurrent user game, You may consider migrating to a more robust concurrent user database system more suited for that use case. SQLite is a very simple to implement and portable solution for the demo purpose and gives you reference implementation for the an AbstractPlayerDatabase.

    To answer the question itself, you should be good to go with providing a relative or absolute path to the login database. Using just
    ./login.db
    - one thing to remember here is on the demo scripts that field is Serialized so you have to update it in the inspector, not just the code!
    A common issue where you cannot open the database is Llama Chat only ships with Windows x64 support and by default Unity will build for Windows x86. All available downloads are here: SQLite Download Page
    upload_2021-9-23_7-47-35.png
    The error you've mentioned is basically the generic "I can't open the database" error from the SQLite connector. It can be that the file is not found (you can check the directory it's looking from by using a log like this:
    Debug.Log($"Trying to open: {PathToDatabase} at: {Directory.GetCurrentDirectory()}");
    )
    Or if you have full logging enabled you may see some logs right before that error like this:
    Code (csharp):
    1. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    2. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3.dll
    3. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    4. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    5. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3.dll
    6. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    7. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    8. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3.dll
    9. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    10. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    11. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3.dll
    12. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    13. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    14. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3.dll
    15. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/sqlite3
    16. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    17. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3.dll
    18. Fallback handler could not load library C:/src/llama-chat-import-test/Build/llama-chat-import-test_Data/Mono/libsqlite3
    if your build is missing the the SQLite libraries.

    I'll update the documentation to include some notes about deploying this on a server when retaining the SQLite database.


    Regarding the Simple Chat bug you reported - Thank you for sending the project - I've found the root cause of the issue and replied to your email with the solution I'll be submitting to the Asset Store in the next couple of days.
     
  24. MuntyMcFly

    MuntyMcFly

    Joined:
    Sep 29, 2016
    Posts:
    14
    Thank you this helped me so much! I was able to get it functioning. I do plan to change databases to something better for production probably just mysql (definitely open to suggestions) since I don't actually store passwords there (using blockchain for login) but only a user address and username :) I am really happy to have helped out with the SimpleChat I really like that asset to lol Very useful stuff.
     
    ChrisKurhan likes this.
unityunity