Galaxy Docs

Import SDK

Setup Guide: There's an step-by-step guide on the home page of your Dashboard
  1. 1.
    Create a game and a leaderboard in your Developer Dashboard.
  2. 2.
    Download Galaxy.unitypackage and import it (double click the unitypackage file when your project is open or choose Assets > Import Package > Custom Package...)
  3. 3.
    In the menu bar, choose GalaxySDK > Open GalaxySDK Settings. In the Inspector, add your Publishable Key found in settings in the dashboard.
AndroidManifest.xml: If you already have an AndroidManifest.xml (or another plugin that causes issues with it), delete /Assets/GalaxySDK/Editor/ModifyUnityAndroidAppManifest.cs
Then add the following line to AndroidManifest.xml manually:
<uses-permission android:name="android.permission.READ_CONTACTS" />
This allows the user to sync their contacts to find their friends, if they elect to. Contacts are never requested without opt-in from the user.
  1. 1.
    Run cordova plugin add cordova-plugin-galaxy
  2. 2.
    publishableKey: 'Your Galaxy Publishable Key',
    }, (result) => { }, (error) => { });
  3. 3.
    Follow instructions on the Readme
<script src=""></script>
publishableKey: 'Your Galaxy Publishable Key',
}, (result) => {
}, (error) => {
  1. 1.
    Setup Cocoapods in your project and add the following to your Podfile: pod 'GalaxySDK'
  2. 2.
    Run pod install
  3. 3.
    In your AppDelegate.swift add the import statement and configure call:
import UIKit
import GalaxySDK
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GalaxySDK.shared.configure(publishableKey: "your publishable key")
return true
  1. 4.
    In Xcode open your app target, select the Info tab, and add NSContactsUsageDescription as a key. For its value, add whatever you want or use this template: "Allow access to your contacts to find friends who also play {your game}"
Contacts: You must add the NSContactsUsageDescription to your Info.plist or the app will crash when the SDK asks for permission to access contacts. If you want to disable this feature, you can do so in your dashboard settings.
  1. 1.
    Download the extension from the marketplace here
  2. 2.
    Set the publishable key in the extension options
  3. 3.
    Authenticate the user with Galaxy_Authenticate()
Custom ID: If you have your own ID for each player, you can call Galaxy_Authenticate(your_player_id)instead.
  1. 4.
    (optional) Set the default leaderboard ID
Then, import the namespace at the top of all files that will interact with Galaxy like so:
using GalaxySDK;
Last modified 3mo ago