Using the SDK

  1. Start by downloading the latest Idnet Unity Package.
  2. Open Unity3d > Assets > Import package > Custom Package > IDNET-Unity3d_V2_0_0.unitypackage.
  3. Initialize the SDK like so Idnet.I.Initialize("APPID", false); replacing with your appid.

It is recommened to always download the Latest version of the SDK for each game. New versions have bug fixes, improvements, and new features.

Notes

  • Initialize id.net in the first scene of your game, in the Start() method. Do this so any script can access the SDK.
  • Inside Unity, find the sample scene Scene.unitypackage and sample script IdnetSample.cs and copy the methods in the sample script as needed.
  • You should use the same App-Id for both Webgl and Webplayer versions of a game.
  • For WebGL, set Enable Exceptions in BuildSettings > PlayerSettings > PublishingSettings to Explicitly Thrown Exceptions Only.
  • Use a method given in this script IdnetSample.cs anywhere in any scene/script (as Idnet.cs is a Singleton class).
  • Before using PostScore and Leaderboard api, make sure to create a table name as explained on Table Setup page.
  • IMPORTANT - Inside the unity editor, the login details will be cached. Caching is used to prevent the need to login each time a game is opened. To clear this cache, Hold Shift + P while in “Editor Play Mode” and then ‘Logout’ from the gui window.
  • Having trouble? See the Frequently asked Questions column.

A working example of the sample scene can be found here.