Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Initialized GameKit.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GameKit | 8.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
none
Returns OK or error.
Initialize GameKit:
# Try to init GameKit
Set Variable [ $r ; Value: MBS( "GameKit.Initialize" ) ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to initialize GameKit." ; $r ]
Exit Script [ Text Result: ]
End If
# Set script to call when player changes
Set Variable [ $r ; Value: MBS( "GameKit.SetPlayerDidChangeScriptTrigger"; Get(FileName); "PlayerChanged" ) ]
# Login if needed
If [ MBS( "GameKit.LocalPlayer.isAuthenticated" ) = 0 ]
# Show Login dialog
Set Variable [ $r ; Value: MBS( "GameKit.LocalPlayer.Authenticate" ) ]
End If
This function is free to use.
Created 5th November 2018, last changed 8th November 2018
GameKit.GameCenterView.ShowBannerWithTitle - GameKit.Leaderboard.GetPlayerScope