Getting Started with Unity

Register and Create App

Here are the steps you need to follow in order to get started with the App42 platform

bullet Register with the App42 platform

bullet Create an app once you are on the Quick-start page (after registration)

bullet If you are already registered, login to the AppHQ console and create an App from the App Manager -> Create App link.

bullet Once the App is created, you will get an ApiKey/SecretKey that you will use in your app for initialization of the SDK.

Download and Set up SDK

bullet Download Unity SDK

bullet Unzip the downloaded Zip file, the unzipped folder contains App42_Unity3D_SDK-x.x.dll (inside x.x/App42-Unity3D-SDK folder) and App42_Unity3D_SDK_WP8-x.x.dll (inside x.x/App42-Unity3D-SDK-WP8 folder)

bullet If you are building your project on Windows Phone, you have to use App42_Unity3D_SDK_WP8-x.x.dll and for rest of the platforms App42_Unity3D_SDK-x.x.dll should be used.

bullet Import required App42 dll as stated above in Assets folder of your Unity Project.

SetUpUnity

bullet Downloaded folder contains sample project too which can be used as a boiler plate project for the Unity application. Please see README for instructions to run this sample.

Initialize SDK

You have to instantiate ServiceAPI class and pass your ApiKey/SecretKey to initialize the SDK.

   ServiceAPI serviceAPI = new ServiceAPI("<API_KEY>","<SECRET_KEY>");

Using App42 Services

Once you have initialized your SDK with the API Key/SecretKey you have to build the target service that you want to use in your app. User Service can be built with the following snippet. Similarly you can build other services with the same notation. Want to know about all the services of App42 Platform? Click Here

//Build User Service
UserService userService = serviceAPI.BuildUserService(); 
// Using userService reference, you should be able to call all its method like create user/update user/authenticate etc.
//Build Storage Service
StorageService storageService = serviceAPI.BuildStorageService(); 
// Using storageService reference, you should be able to call all its method like insert/save/update/delete etc for JSON objects.
//Similarly you can build other services like App42API.buildXXXXService()

Next

bullet Go To Creating App User for learning App User Management

OR

bullet Go To Saving App Data to learn about App Data Storage.