How do I know if a user is logged in?

if (Idnet.User.LoggedIn())
{
    Debug.Log("User logged in to IDnet: " + "Nickname " + Idnet.User.Current.Nickname);
}
else
{
    Debug.Log("Not logged-in to IDnet");
}

How to fix mouse clicks going through the menus?

Clicks going through buttons is a limitation of the Unity GUI.

Workaround 1: Easy and Fast Process

  • Attach this Script on Buttons coming below the Idnet Gui boxes.
  • Script Functionality: If any of the Idnet gui windows are opened,this script detects it & then disables the buttons/colliders on which its attached to,and re-enables them when Idnet gui windows are closed, so attach this script only on buttons coming below the Idnet gui windows.

Workaround 2: Lengthy Process

When id.net windows are opened, you can Disable the buttons coming below and Re-Enable them when the id.net windows are closed. You can use id.net close button callbacks to Re-Enable your buttons.

Close button callback:

Idnet.I.Login(loginRegisterException => {
 if (Idnet.User.LoggedIn())
 {
    // Callback: Login succesfull.
    Debug.Log("User logged in: " + "Nickname " + Idnet.User.Current.Nickname);
 }
 else
 {
    Debug.Log("IDnet Login Gui window closed");
 }
});

Idnet.I.Register(loginRegisterException => {
 if (Idnet.User.LoggedIn())
 {
    // Callback: Login succesfull.
    Debug.Log("User logged in: " + "Nickname " + Idnet.User.Current.Nickname);
 }
 else
 {
    Debug.Log("IDnet Register Gui window closed");
 }
});

Idnet.I.Leaderboard((leaderboard, leaderboardException) => {
    Debug.Log("Leaderboard Gui window closed");
});

Idnet.I.ListAchievements((listAchievementException) => {
	Debug.Log("Achievement Gui window closed");
});

How to make a custom achievements menu

The CustomAchievementExample.cs script has been added in the sdk. That file will give you list of locked and unlocked achievement names and descriptions.

How to update the SDK?

To update the sdk, delete the Idnet folder from your project and import the Latest version. APIs that are already implemented will continue to work.

How to close the id.net menu?

Idnet.I.CloseGui();

How do I sitelock my game to Y8’s network?

You can use the Sponsor Api to checkw if your game is running on the Y8 network.

How to setup logo buttons for Y8 sponsorships?

Branding Setup Using this Drag and Drop setup,everything will be handled by unity-sdk with no code required from your side,just drag & drop the logos in the needed scenes & position them at appropriate places on screen.

How to check if a game is hosted on the Y8 network?

If you are using the Drag and Drop Setup, the More Games button will automatically be hidden outside of Y8. It is handled internally through the sdk.

If you are not using the Drag and Drop Setup, use the Sponsor Api.

You can use Idnet.I.DomInjection("url") and call it on a unity MouseDown event.

See the following examples: OnMouseDown, OnPointerDown.

This workaround only works on MouseDown events and not the legacy Gui(Gui.Button()).

Should Unity WebPlayer and Unity WebGL use the same app id?

Yes, both should use same App-Id.

How to fix Table name not provided error?

Make sure you have created a table name (Eg. “LEADERBOARD”) as explained on the Table Setup page.

How to logout from an account?

Inside the Unity editor, your login details will be cached. This caching setup has been done so as to prevent you from logging in to id.net each time you test your game. To clear this cache, Hold Shift & P while in the Editor Play Mode, then Logout from the menu.