- Home /
How to save chat history?
Hi everyone! I´m currently working on implementing a chat system into my app. I actually have the system working just fine but I would like to ask Your opinion on how to save the chat history. Would it be possible to do using an asset such as: https://assetstore.unity.com/detail/tools/input-management/save-game-free-gold-update-81519 Each message I save must be saved along with 2 other pieces of information: the number of the message(the older messages will be loaded first) and the person who sent the message, so the messages should ideally be accessable by the int(to load the newest messages first and if the user scrolls up in the chat, then the older ones) I´ve never done anything similar so I have no experience in that. I think it could be done with dictionaries or lists? Does anyone have any ideas? Thanks!
Depends on what you need. You can use List, Dictionary or Queue. $$anonymous$$essage itself can be struct. For storage container you can use ScriptableObject
Your answer
Follow this Question
Related Questions
PlayerName in Chat Window 2 Answers
Network.player giving me 0 0 Answers
Photon MMO chat 0 Answers
My ChatScript Don't sent messages to other clients 0 Answers
RPC Broadcast using Unet 1 Answer