Using the SDK
- Start by downloading the latest Idnet Unity Package.
- Open Unity3d > Assets > Import package > Custom Package > IDNET-Unity3d_V2_0_0.unitypackage.
- 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.
- 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.unitypackageand sample script
IdnetSample.csand 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 Exceptionsin BuildSettings > PlayerSettings > PublishingSettings to
Explicitly Thrown Exceptions Only.
- Use a method given in this script
IdnetSample.csanywhere 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 + Pwhile 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.