GKAccessPoint

Inherits: RefCounted < Object

Controls the Game Center access point overlay.

Description

The access point displays a control in a corner of your game that opens a Game Center dashboard when the player taps or clicks it.

Use the GameCenterManager.access_point property to get the shared access point object, then configure its location, active, and other properties.

Properties

bool

active

false

Rect2

frame_in_screen_coordinates

Rect2(0, 0, 0, 0)

Rect2

frame_in_unit_coordinates

Rect2(0, 0, 0, 0)

bool

is_presenting_game_center

false

int

location

0

bool

show_highlights

false

bool

visible

false

Methods

void

trigger(done: Callable)

void

trigger_for_challenges(done: Callable)

void

trigger_for_friending(done: Callable)

void

trigger_for_play_together(done: Callable)

void

trigger_with_achievement(achievementID: String, done: Callable)

void

trigger_with_challenge_definition_id(challengeDefinitionID: String, done: Callable)

void

trigger_with_game_activity(gameActivity: GKGameActivity, done: Callable)

void

trigger_with_game_activity_definition_id(gameActivityDefinitionID: String, done: Callable)

void

trigger_with_leaderboard(leaderboardID: String, playerScope: int, timeScope: int, done: Callable)

void

trigger_with_leaderboard_set(leaderboardSetID: String, done: Callable)

void

trigger_with_player(player: GKPlayer, done: Callable)

void

trigger_with_state(state: int, done: Callable)


Enumerations

enum Location: 🔗

Location TOP_LEADING = 0

Display the access point in the top-leading corner.

Location TOP_TRAILING = 1

Display the access point in the top-trailing corner.

Location BOTTOM_LEADING = 2

Display the access point in the bottom-leading corner.

Location BOTTOM_TRAILING = 3

Display the access point in the bottom-trailing corner.


Property Descriptions

bool active = false 🔗

  • void set_active(value: bool)

  • bool get_active()

A Boolean value that determines whether to display the access point.


Rect2 frame_in_screen_coordinates = Rect2(0, 0, 0, 0) 🔗

  • Rect2 get_frame_in_screen_coordinates()

The frame of the access point in screen coordinates.


Rect2 frame_in_unit_coordinates = Rect2(0, 0, 0, 0) 🔗

  • Rect2 get_frame_in_unit_coordinates()

Read-only frame of the access point normalized to the main screen size (0.0 to 1.0 in each axis).

Returns Rect2(0, 0, 0, 0) when the screen size is unavailable or on visionOS.


bool is_presenting_game_center = false 🔗

  • bool get_is_presenting_game_center()

A Boolean value that indicates whether the game is presenting the Game Center dashboard.


int location = 0 🔗

  • void set_location(value: int)

  • int get_location()

The corner of the screen to display the access point. Use the Location constants.


bool show_highlights = false 🔗

  • void set_show_highlights(value: bool)

  • bool get_show_highlights()

A Boolean value that indicates whether to display highlights for achievements and current ranks for leaderboards.


bool visible = false 🔗

  • bool get_visible()

A Boolean value that indicates whether the access point is visible.


Method Descriptions

void trigger(done: Callable) 🔗

Displays the Game Center dashboard as if the player taps or presses the access point.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.


void trigger_for_challenges(done: Callable) 🔗

Displays the Game Center dashboard in the Challenges context.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_for_friending(done: Callable) 🔗

Displays the Game Center dashboard in the Friending context.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_for_play_together(done: Callable) 🔗

Displays the Game Center dashboard in the Play Together context.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_with_achievement(achievementID: String, done: Callable) 🔗

Displays the Game Center dashboard in a state that shows a specific achievement.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Only available on macOS 15, iOS 18, tvOS 14, and visionOS 1; earlier versions perform no action.


void trigger_with_challenge_definition_id(challengeDefinitionID: String, done: Callable) 🔗

Displays the Game Center dashboard focused on the challenge definition with identifier challengeDefinitionID.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_with_game_activity(gameActivity: GKGameActivity, done: Callable) 🔗

Displays the Game Center dashboard focused on gameActivity.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_with_game_activity_definition_id(gameActivityDefinitionID: String, done: Callable) 🔗

Displays the Game Center dashboard focused on the game activity definition with identifier gameActivityDefinitionID.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Available on iOS 26 and macOS 26. On older OS versions, tvOS, and visionOS, this method performs no action.


void trigger_with_leaderboard(leaderboardID: String, playerScope: int, timeScope: int, done: Callable) 🔗

Displays the Game Center dashboard in a state that shows a specific leaderboard.

Use PlayerScope for playerScope and TimeScope for timeScope.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Only available on macOS 15, iOS 18, tvOS 14, and visionOS 1; earlier versions perform no action.


void trigger_with_leaderboard_set(leaderboardSetID: String, done: Callable) 🔗

Displays the Game Center dashboard in a state that shows a specific leaderboard set.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Only available on macOS 15, iOS 18, tvOS 14, and visionOS 1; earlier versions perform no action.


void trigger_with_player(player: GKPlayer, done: Callable) 🔗

Displays the Game Center dashboard in a state that shows a player profile.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.

Only available on macOS 15, iOS 18, tvOS 14, and visionOS 1; earlier versions perform no action.


void trigger_with_state(state: int, done: Callable) 🔗

Displays the Game Center dashboard in the specified state. See State for values.

done is called (with no arguments) when the dashboard presentation completes or is dismissed.