Page cover image

2.1. Login with Unity

You can download the unity package here.

How to integrate the IDC Login prefab for Unity:

1. Drag IDCLoginManager prefab to your scene.

2. Select IDCLoginManager object and set your game "secret" at the Inspector.

Unity login secret

3. You can retrieve if a user is logged in with the IsLogged property.

string isLogged = IDCLoginManager.instance.IsLogged;

4. Retrieve advanced user data by adding the following code at your scripts:

string userId = IDCLoginManager.instance.UserId;
string country = IDCLoginManager.instance.Country;
string language = IDCLoginManager.instance.Language;
string currency = IDCLoginManager.instance.Currency;
string nick = IDCLoginManager.instance.Nick;
string email = IDCLoginManager.instance.Email;
string status = IDCLoginManager.instance.Status;
string avatar = IDCLoginManager.instance.Avatar;
string custom = IDCLoginManager.instance.Custom;

Last updated