aws-samples / amazon-gamelift-unity

A multi-player game sample (server and client), developed with the Unity game engine, illustrating basic integration with Amazon GameLift. View the sample source code or build the project and experiment with game server deployment on the Amazon GameLift service.
Apache License 2.0
82 stars 22 forks source link

GameLift Script Performance #7

Closed SpeitK closed 4 years ago

SpeitK commented 4 years ago

Hi Al,

Needed to contact you but only found this way to do it. I'm using this gamelift example on my own unity game. At the moment, the gamelift code starts running when you press a button in a menu. Problem is, creating a game session or joining one pretty much freezes the main thread for a couple of seconds which makes the menu feel quite laggy. I tried modifying the gamelift script and turn it into a coroutine but some methods still freeze the game completely. Using the unity job system or threads wouldn't(?) work since the code calls and it's called from gamelogic (main thread). Do you have any advice to solve this issue?. Ideally, I want to do other stuff while the game looks for a match without having hiccups or huge drops in frames.

Regards