Migration Guide: From Google Play Games Plugin for Unity to Essential Kit Game Services

This guide provides step-by-step instructions for migrating from Google Play Games Plugin to Essential Kit's Game Services. The migration process involves updating your authentication, achievements, leaderboards, and friends management code to use Essential Kit's unified cross-platform API.

Prerequisites

  • Essential Kit package installed and configured

  • Existing Google Play Games Plugin project to migrate

  • Platform IDs for your existing leaderboards and achievements

Migration Overview

Aspect
Google Play Games Plugin
Essential Kit Game Services

Namespace

using GooglePlayGames;

using VoxelBusters.EssentialKit;

Platform Support

Android only

iOS + Android unified

Initialization

PlayGamesPlatform.Activate()

GameServices.Initialize() (optional)

Authentication

Social.localUser.Authenticate()

GameServices.Authenticate()

Platform Abstraction

Unity's Social API + Google extensions

Essential Kit unified API

Step 1: Configuration Setup

1.1 Remove Google Play Games Plugin Configuration

// REMOVE: Old Google Play Games initialization
PlayGamesPlatform.Activate();
PlayGamesPlatform.Instance.AddIdMapping("high_scores", "CgkIabcdefghijklmnop");
PlayGamesPlatform.Instance.AddIdMapping("first_win", "CgkIxyzuvwabcdefgh");

1.2 Configure Essential Kit Settings

  1. Open Window β†’ Voxel Busters β†’ Essential Kit β†’ Settings

  2. Navigate to Game Services section

  3. Configure your leaderboards and achievements:

Leaderboards Configuration:

Achievements Configuration:

Step 2: Namespace and Initialization Migration

2.1 Update Using Statements

2.2 Update Initialization Code

Step 3: Authentication Migration

3.1 Authentication Status Handling

3.2 Check Authentication Status

Step 4: Achievement Migration

4.1 Reporting Achievement Progress

4.2 Loading Achievements

4.3 Show Achievements UI

Step 5: Leaderboard Migration

5.1 Reporting Scores

5.2 Loading Leaderboards

5.3 Show Leaderboard UI

Step 6: Friends Management Migration

6.1 Loading Friends

6.2 Adding Friends (Essential Kit Feature)

Step 7: Advanced Features Migration

7.1 Server Credentials (Enhanced in Essential Kit)

7.2 Error Handling Improvements

Step 8: Event Management Migration

8.1 Subscribe to Game Services Events

Step 9: Platform-Specific Considerations

9.1 Handling iOS Game Center (New Capability)

Step 10: Testing and Validation

10.1 Testing Checklist

10.2 Common Migration Issues and Solutions

Issue: Missing platform IDs

Issue: Authentication not working

Google Play Services Authentication

Issue: Cross-platform testing

Benefits After Migration

  1. Cross-Platform Unity: Single codebase works on both iOS and Android

  2. Improved Error Handling: Detailed error information for better debugging

  3. Modern API Design: Cleaner, more intuitive method signatures

  4. Visual Configuration: Inspector-based setup reduces code complexity

  5. Enhanced Features: Additional functionality like AddFriend, server credentials

  6. Future-Proof: Unified API insulates from platform-specific changes

This migration guide should help you transition from Google Play Games Plugin to Essential Kit Game Services while taking advantage of the enhanced cross-platform capabilities and improved developer experience.

Last updated

Was this helpful?