Get Chat History

hi
i am using unity 2021 and i want to get my channel history but
it uses main thread and freeze my game if i get 100 messages

Hey @TheNeSSePa I recommend using Unity’s built-in profiler and looking at what the CPU is spending time on. In theory there is nothing about 100 messages that should freeze your game. You are welcome to run Nakama in a multiple threads if you’d like but be aware that you would need to pass messages back and forth into the Unity main thread.

i debuged it
and seems that when i call client.getchannelhistory main will freeze
and i try it to call it from another thread but
i got a error (its only can call from main thread)

Hey @TheNeSSePa I recommend being even more detailed in your profiling. If you enable a detailed view in the profiler the stack trace in the highest CPU time sections should reveal more information.

1 Like

you was right
its ok now its about my spawning objects tnks