I’ve updated an existing game to try the latest 0.3.3 Polyspatial version, and while previously our use of async loading was causing a crash, it seems that crash has been fixed, but now we’re getting:
StopwatchSupport/XRSheetHostManager.swift:76: Fatal error: No ornament manager
Has this been seen before? I’m going through our setup code to see what might be causing it, it looks it might be related to “yield return new WaitForSeconds()” but don’t know for sure yet.
After some testing I’ve tracked it down to the game having Game Center enabled in Entitlements and Capabilities in Xcode. Removing those has fixed the crash for now, I guess this is an issue on Apple’s end with properly supporting this feature.
My guess is that the “Ornament Manager” refers to something to manage the Game Center UI bubble that appears on iOS, MacOS apps when you login to Game Center.
Game Center works fine if the user is already logged in (e.g., via Settings app), but crashes on startup if the user is logged out (an Apple issue, not Unity).
For now, authentication in GameCenter (if there is no user logged into the system GameCenter), only works if the application/scene uses bounded volume.
In the case that you use unbounded volume, and try to open the native panel to authenticate in gamecenter (from Unity), the application crashes.
The problem is located in GameKit library, in the call to authenticate to GameCenter (And it can’t be fixed from Unity, just use bounded volumes): GKLocalPlayer.local.authenticateHandler
I’m just encountering the crash (when not logged in thru Settings) in a fully immersive app. I’m logging in using Unity’s social APIs like this:
Social.Active = new GameCenterPlatform();
Social.localUser.Authenticate(OnGameCenterAuthenticated);
Has anyone found a way to detect you aren’t logged in, so we can avoid triggering the crash? Maybe I need the full GameKit lib for that? That way, at least I could provide an error and keep leaderboards working if you are logged in…
I’ve read in some other places, that the callback for Authenticate does not properly trigger (this is a reason why people were directly using a modified version of the Apple Unity GameKit library). I do this:
// As part of some initialization function
// Authenticate the user through GameCenter.
// This call needs to be made before we can proceed to other calls in the Social API
Social.localUser.Authenticate(success =>
{
if (!success)
{
Debug.Log("EP: Apple GameCenter was not authenticated.");
}
});
So, that lambda may or may not be triggered, so any time I go to do anything in the Social.localUser, I also check
if (Social.localUser.authenticated)
{
Now, this is fine for us, because if the user isn’t logged in to GameCenter already, we just carry on and not care (gamecenter is not a requirement for us). We don’t specifically ask the user to login - so if your app can survive not having GameCenter logged in, this might help.