Overview

You can use an SDK to help implement AccelByte services in your game. The SDK acts as a bridge between your game and our services, making those services easy to access. There are two SDKs available for you to use as follows.

Download Unity SDKDownload UE4 SDK

Plugin Usage

Here’s an example of how to use the SDK to create a new user profile. Note that you must be logged in before you can implement any backend services.

using AccelByte.Api;
using AccelByte.Models;
using AccelByte.Core;
class MainMenu
{
public void OnLoginClick(string email, string password)
{
var user = AccelBytePlugin.GetUser();
user.LoginWithUsername(email, password,
result =>
{
if (result.IsError)
{
Debug.Log("Login failed");
}
else
{
Debug.Log("Login successful");
}
});
}
public void OnCreateProfileClick()
{
var userProfiles = AccelBytePlugin.GetUserProfiles();
userProfiles.CreateUserProfile(
new CreateUserProfileRequest
{
language = "en",
timeZone = "Asia/Jakarta",
firstName = "John",
lastName = "Doe",
dateOfBirth = "2000-01-01"
},
result =>
{
if (result.IsError)
{
Debug.Log("Creating user profile failed");
}
else
{
Debug.Log("User profile created.");
Debug.Log("First Name: " + result.firstName);
Debug.Log("Last Name: " + result.lastName);
}
});
}
}

What's Next?

  • Learn about How to Get Started with Unity and UE4.