# Unity Sdk - client.NewSocket(useMainThread) is no more usable. How can I set it to force use the mainThread?

**URL:** <https://forum.heroiclabs.com/t/unity-sdk-client-newsocket-usemainthread-is-no-more-usable-how-can-i-set-it-to-force-use-the-mainthread/5553>\
**Category:** Client Libraries\
**Tags:** sdk-unity\
**Created:** [August 12, 2024, 11:41am UTC](https://forum.heroiclabs.com/t/unity-sdk-client-newsocket-usemainthread-is-no-more-usable-how-can-i-set-it-to-force-use-the-mainthread/5553 "2024-08-12T11:41:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yusuf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/yusuf/32/1520_2.png) [@yusuf](https://forum.heroiclabs.com/u/yusuf)\
**Post date:** [August 12, 2024, 11:41am UTC](https://forum.heroiclabs.com/t/unity-sdk-client-newsocket-usemainthread-is-no-more-usable-how-can-i-set-it-to-force-use-the-mainthread/5553/1 "2024-08-12T11:41:45Z")

</div>

> **[Unity/.Net](https://heroiclabs.com/docs/nakama/client-libraries/unity/index.html#socket-creation)**
>
> The official Unity client handles all communication in real-time with the server. It implements all features in the server. This guide will show you how to use the core Nakama features in Unity by showing you how to develop the Nakama specific parts...

I have downloaded the new version of Nakama Unity SDK. As I see, the socket opening process changed. How can I set the main thread usage parameter using the new method?

Should I downgrade?

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [August 13, 2024, 8:30am UTC](https://forum.heroiclabs.com/t/unity-sdk-client-newsocket-usemainthread-is-no-more-usable-how-can-i-set-it-to-force-use-the-mainthread/5553/3 "2024-08-13T08:30:06Z")

</div>

@yusuf You can still use `NewSocket` extension method on the `IClient` type of the Nakama client:

```csharp
client.NewSocket(useMainThread: true)

```

This behaviour has not changed since it was added. You must make sure you add the Nakama client as a `.unitypackage` to your project or add it via the Unity Package Manager:

```auto
https://github.com/heroiclabs/nakama-unity.git?path=/Packages/Nakama#v3.13.0

```

Hope that helps.
