microsoft / gdk-unity-package

The Unity package for PC GDK developers.
Other
51 stars 18 forks source link

Preventing innocuous XblInitialize error on repeated in-editor playing #98

Closed tculotta closed 2 years ago

tculotta commented 2 years ago

When starting a game in-editor multiple times in a row, you were likely to see an "Initialize Xbox Live failed" because XBL would've already been initialized the first time you hit play, and it's unlikely the game itself would call XblCleanup when stopping play via the editor. This wouldn't necessarily have caused a real problem as XBL would actually still be correctly initialized from before, but it could've resulted in odd behavior if certain services remained active.

This ensures cleanup happens when leaving "play" so that XBL really does get a fresh initialize each time.