# LoadScene() working on build but not in Play Mode inside ReceivedMatchmakerMatched callback

**URL:** <https://forum.heroiclabs.com/t/loadscene-working-on-build-but-not-in-play-mode-inside-receivedmatchmakermatched-callback/281>\
**Category:** Local Setup\
**Created:** [October 16, 2019, 11:47pm UTC](https://forum.heroiclabs.com/t/loadscene-working-on-build-but-not-in-play-mode-inside-receivedmatchmakermatched-callback/281 "2019-10-16T23:47:03Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 6, 2020, 8:43am UTC](https://forum.heroiclabs.com/t/loadscene-working-on-build-but-not-in-play-mode-inside-receivedmatchmakermatched-callback/281/4 "2020-04-06T08:43:10Z")

</div>

@hackiey Have a look at this forum thread:

[Issue of unavailable thread context for main-thread-only unity functionalities when called from Namama Socket.ReceiveLoop() async events](https://forum.heroiclabs.com/t/issue-of-unavailable-thread-context-for-main-thread-only-unity-functionalities-when-called-from-namama-socket-receiveloop-async-events/578/2)

In short you should use `UnityMainThreadDispatcher` or another library to “move” the execution of your scene change off the socket thread and back onto the Unity main thread:

[https://github.com/PimDeWitte/UnityMainThreadDispatcher](https://github.com/PimDeWitte/UnityMainThreadDispatcher)

---

_[View the full topic](https://forum.heroiclabs.com/t/loadscene-working-on-build-but-not-in-play-mode-inside-receivedmatchmakermatched-callback/281)._
