Using the SDK

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

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 Y8 Account in the first scene of your game, in the Awake() method. Do this so any script can access the SDK.
  • Inside Unity, find the sample scene IdnetSampleScene.unitypackage and sample script IdnetSample.cs and copy the methods in the sample script as needed.
  • 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.