WAK

WAK: MQTT for IoT – Brief Documentation

Read about MQTT here. Setting up your scene: 1. Create a GameObject. 2. Add the following scripts: ConnectionBroker, DesktopClient, and WebGLClient. 3. Configure your connection options on the ConnectionBroker’s DefaultConnectionOptions field. 4. Add the GlobalTopic script to one of your game objects.  Set its filter (topic path) and other options. 5. Add the SomeReceiver script […]

WAK FAQ [1]

Here are answers to questions a potential user asked recently. Previous: OAuth2 in Unity

OAuth Overview in Unity

Below is one of the OAuth flows available in the WAK OAuth Token Interceptor asset. Next: WAK FAQ 1 Previous: Switching WAK Provider

Switching WAK Provider

By default, each WAK HTTPOperation uses Unity’s WWW class to communicate over the wire.  There are other, more robust, HTTP libraries out there and are fully supported in WAK.  A couple reasons why you would want to use a library such as BestHTTP, UniWeb, or UnityHTTP are: WWW class is limited to the GET and POST […]

Modeling WAK Responses

In the previous post we created a simple WAK HTTP operation and retrieved a blob of unusable data from Instagram. What we need to do with that JSON blob is to generate C# classes from it so that the response can be accessed in Unity.  The simplest way to go about this, even before creating […]

Inside WAK Operations

WAK operations define everything about an HTTP call.  The information on how to structure the class comes from the API’s documentation. Let’s take a look at one of Instagram’s endpoints. Let’s take a look at the URI: https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN&count=100 Base URI Resource Path Query String https://api.instagram.com/v1/ tags/{tag-name}/media/recent ?access_token=ACCESS-TOKEN&count=10 This is our entry point into Intagram’s version […]

How WAK Works

Web API Kit is a set of tools to reduce the code you need to write for the Unity WWW class, UniWeb, BestHTTP, and UnityHTTP. A fully featured WWW call that supports authentication, timeouts, cancellation, conversion of returned JSON or XML data into a usable C# class would easily be over 200 lines of code. […]